1
2
3
4
5 INTEGER NBLEN(STRING)
6 IMPLICIT INTEGER (A-Z)
7 CHARACTER*(*) STRING
8
9 NBLEN=LEN(STRING)
10 100 IF(NBLEN.LE.0) RETURN
11 IF(STRING(NBLEN:NBLEN).NE.' ') RETURN
12 NBLEN=NBLEN-1
13 GO TO 100
14
15
16
17
18
19
20 INTEGER RND (N)
21 IMPLICIT INTEGER (A-Z)
22 REAL RAN
23 COMMON /SEED/ RNSEED
24
25
26 call random_$uniform (RAN)
27 rnd = ran * float (n)
28 RETURN
29
30
31
32
33
34 INIRND (LOW, HIGH)
35 IMPLICIT INTEGER (A-Z)
36 COMMON /SEED/ RNSEED
37
38
39 call random_$set_seed (INT(OR(HIGH*65536+LOW,1)))
40 RETURN
41
42