Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!zephyr.ens.tek.com!uw-beaver!milton!seymour From: seymour@milton.u.washington.edu (Richard Seymour) Newsgroups: comp.lang.fortran Subject: Re: randu? Message-ID: <17478@milton.u.washington.edu> Date: 1 Mar 91 21:11:44 GMT References: <62349@eerie.acsu.Buffalo.EDU> <1991Mar1.010946.16149@sol.UVic.CA> Organization: University of Washington, Seattle Lines: 13 haozhou@acsu.buffalo.edu (Hao Zhou) writes: >>I am trying to port some fortran source code from vax/vms to sun/unix. >> call randu(i1,i2,u) >>where i1,i2,and u weren't initialized before the call. I guess this >>routine returns a random number in u and i1 and i2 are two seeds. and i forgot to mention that VMS Fortran predefines all variables to ZERO, if you don't override it with a data statement (a consequence of Demand-Zero Virtual memory) which is why the RANDU routine uses I1=I2=0 as recognition of a initialization. You can also SET i1 and i2 to zero to replay a random number sequence. --dick