GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
getcgn.f
Go to the documentation of this file.
1 SUBROUTINE getcgn(g)
2 INTEGER*4 g
3C**********************************************************************
4C
5C SUBROUTINE GETCGN(G)
6C Get GeNerator
7C
8C Returns in G the number of the current random number generator
9C
10C
11C Arguments
12C
13C
14C G <-- Number of the current random number generator (1..32)
15C INTEGER G
16C
17C**********************************************************************
18C
19 INTEGER*4 curntg,numg
20 SAVE curntg
21 parameter(numg=32)
22 DATA curntg/1/
23C
24 g = curntg
25 RETURN
26
27 entry setcgn(g)
28C**********************************************************************
29C
30C SUBROUTINE SETCGN( G )
31C Set GeNerator
32C
33C Sets the current generator to G. All references to a generat
34C are to the current generator.
35C
36C
37C Arguments
38C
39C
40C G --> Number of the current random number generator (1..32)
41C INTEGER G
42C
43C**********************************************************************
44C
45C Abort if generator number out of range
46C
47 IF (.NOT. (g.LT.0.OR.g.GT.numg)) GO TO 10
48 WRITE (*,*) ' Generator number out of range in SETCGN:',
49 + ' Legal range is 1 to ',numg,' -- ABORT!'
50 CALL xstopx (' Generator number out of range in SETCGN')
51
52 10 curntg = g
53 RETURN
54
55 END
subroutine getcgn(g)
Definition getcgn.f:2