getcgn.f

Go to the documentation of this file.
00001       SUBROUTINE getcgn(g)
00002       INTEGER g
00003 C**********************************************************************
00004 C
00005 C      SUBROUTINE GETCGN(G)
00006 C                         Get GeNerator
00007 C
00008 C     Returns in G the number of the current random number generator
00009 C
00010 C
00011 C                              Arguments
00012 C
00013 C
00014 C     G <-- Number of the current random number generator (1..32)
00015 C                    INTEGER G
00016 C
00017 C**********************************************************************
00018 C
00019       INTEGER curntg,numg
00020       SAVE curntg
00021       PARAMETER (numg=32)
00022       DATA curntg/1/
00023 C
00024       g = curntg
00025       RETURN
00026 
00027       ENTRY setcgn(g)
00028 C**********************************************************************
00029 C
00030 C     SUBROUTINE SETCGN( G )
00031 C                      Set GeNerator
00032 C
00033 C     Sets  the  current  generator to G.    All references to a generat
00034 C     are to the current generator.
00035 C
00036 C
00037 C                              Arguments
00038 C
00039 C
00040 C     G --> Number of the current random number generator (1..32)
00041 C                    INTEGER G
00042 C
00043 C**********************************************************************
00044 C
00045 C     Abort if generator number out of range
00046 C
00047       IF (.NOT. (g.LT.0.OR.g.GT.numg)) GO TO 10
00048       WRITE (*,*) ' Generator number out of range in SETCGN:',
00049      +  ' Legal range is 1 to ',numg,' -- ABORT!'
00050       CALL XSTOPX (' Generator number out of range in SETCGN')
00051 
00052    10 curntg = g
00053       RETURN
00054 
00055       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines