ranf.f 558 Bytes
function ranf (sw)
c
c this random number generator is only a convenient driver routine
c for the portable generator random.
c the random number lies between 0. and 1.
c
      common /rantab/ t(33)
      external random
      data ranold /0./
c
      if (sw.lt.0.) go to 10
c
      ranf = random (t, 32)
      ranold = ranf
      return
c
 10   write (6, 20) (t(i), i=1,33)
 20   format (///10x, 28h current random number table // (10x, 5f15.10))
c
      write (7, 30) (t(i), i=1,33)
 30   format (5f15.10)
c
      ranf = ranold
      return
      end