C
C
C *********************************************************************
C ******** UTILITY SUBPROGRAMMES: RND,ISHFT,BITSET,BUG ****************
C *********************************************************************
C
C
      INTEGER FUNCTION RND(RANGE)
      INTEGER*4 A(4),RANGE,I
      REAL*8 X
      EQUIVALENCE (A(1),X)
      DATA I /0/
C
C  MODIFIED FOR GEC 4070 SYSTEM IBM 370 COMMENTED OUT
C
      IF (I .NE. 0) GOTO 10
C5     CALL DATE(X)
C      I=A(1)+A(2)+A(3)+A(4)
C      CALL CLOCK(X)
C      I=I+A(1)+A(2)+A(3)+A(4)
C      IF (I.LT.0) I=-I
C      IF (I.EQ.0) GOTO 5
C     CALL SETRAN
C10    CALL RANDOM (I,R)
C  10 RND=FLOAT(RANGE)  * RANDOM ( )
C   10 RND=FLOAT(RANGE)*RANDT(1)
   10 RND=FLOAT(RANGE)*RANDOM(0)
      RETURN
      END
