HP3000-L Archives

December 2006, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Tue, 12 Dec 2006 22:13:36 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Shawn Gordon wrote:
> OMG, why in the world do you need a field that will store the distance
> from us to the Andromeda galaxy in inches?  Just call CLOCK  as a seed
> value, it goes down to a tenth of a second, which might do it, I
> always used this in a loop to create random file names until
> flabelinfo didn't fail on the file name.  I seem to remember some
> random seed generator, but I can't remember the language or platform
> now, but I thought it was back on a series III 
Indeed you did!  :-)

Jeff

(http://raven.utc.edu/cgi-bin/WA.EXE?A2=ind9907D&L=hp3000-l&D=0&P=33641)

Subject:    Re: COBOL Random number generator
From:    Shawn Gordon <[log in to unmask]>
Reply-To:    Shawn Gordon <[log in to unmask]>
Date:    Wed, 28 Jul 1999 11:43:26 -0700
Content-Type:    text/plain

I'm not sure about keeping it to 4 digits, but here is something you can
use.

01 RAND                    PIC S9(9)   COMP VALUE 0.
01 SEED                    PIC S9(9)   COMP VALUE 0.

 CALL INTRINSIC 'RAND1' GIVING SEED.
CALL INTRINSIC 'RAND' USING SEED GIVING RAND

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2