-
Notifications
You must be signed in to change notification settings - Fork 0
/
OUCHIF.F90
65 lines (48 loc) · 1.07 KB
/
OUCHIF.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
! Code to abstract GFortran specific calls.
! Owain Kenway
! Equivalent of iargc
subroutine countargs(n)
use ISO_FORTRAN_ENV
implicit none
integer, intent(out) :: n
n = command_argument_count()
end
! Equivalent of getarg
subroutine getargat(n, s, l)
use ISO_FORTRAN_ENV
implicit none
integer, intent(in) :: n
integer, intent(out) :: l
character (len=1024), intent(out) :: s
call get_command_argument(n, length=l)
call get_command_argument(n, s)
end
! Get time in seconds
subroutine getsec(t)
use ISO_FORTRAN_ENV
implicit none
real, intent(out) :: t
call cpu_time(t)
end
! Start random number generation.
! Technically we don't need to do anything in OpenWatcom
subroutine initrand(s)
use ifport
implicit none
integer, intent(in) :: s
call seed(s)
end
! Get next number.
! Need to pass seed as that's always needed by OpenWatcom
function getrand(s)
use ifport
implicit none
real :: getrand
integer :: s
getrand = rand()
end
! Sleep that only happens on DOS
subroutine dossleep(seconds)
implicit none
integer :: seconds
end