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:
"Keven Miller (rtt)" <[log in to unmask]>
Reply To:
Keven Miller (rtt)
Date:
Tue, 12 Dec 2006 20:02:32 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
http://docs.hp.com/cgi-bin/doc3k/B3150090013.11820/148

I'm not a Cobol programmer. But usually these random functions are
similar.

You only need to seed the function once, to get a random sequence.
If you want to change the sequence, then you give it a new seed.

I suspect that if you provide the same seed value, the sequence
starts all over again, hence as you see, the same seed gives the
same number.

If you truly want to get a new sequence every minute or second,
then only pass a seed when the minute or second changes. Otherwise,
just call the function without a seed to get the next random number
in that sequence.

Keven

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

ATOM RSS1 RSS2