home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!gatech!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!sun4nl!ittpub.nl!david
- From: david@ittpub.nl (David P. Morgan)
- Newsgroups: comp.os.vms
- Subject: Re: A random number
- Message-ID: <1993Jan21.152713.95@ittpub.nl>
- Date: 21 Jan 93 21:36:51 GMT
- References: <1993Jan21.041813.20307@ccu1.aukuni.ac.nz> <1993Jan21.015717.1@woods.ulowell.edu>
- Organization: ITT Publitec R+D BV, Amsterdam
- Lines: 19
-
- In article <1993Jan21.015717.1@woods.ulowell.edu>, sabotkap@woods.ulowell.edu writes:
- > Greg Sands writes:
- > -> Is there an easy way to get a scaled random number into a DCL com file?
- > -> Say an integer between 0 and 1000 or something like that? I had a look in
- > -> the manual, but didn't really even know where to start looking, so even a
- > -> pointer in that direction would be helpful. Thanks.
- >
- > Try anonymous FTP to ACFCLUSTER.NYU.EDU in [.VMS] subdirectory. RANDOM.COM
- > is an application entirely in DCL which should do what you want.
- >
- The simplest thing to do is to take the hundredths and seconds from the
- current time. It's random enough!
-
- irand=f$integer(f$extract(21,2,f$time())+f$extract(18,2,f$time()))
-
- --------------------------------------------------------------------------------
- David P. Morgan Internet: david@ittpub.nl |ucannot
- ITT Publitec R+D BV UUCP: ...!sun4nl!ittpub!david|readdis
- Amsterdam PSI: 020412905761212::DAVID |onavt52
-