× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Does anyone have a reasonable Pseudo random number routine for RPG? I
need something does doesn't rely on any calls to system routines.

Interesting.  What's wrong with the system routines?

Thanks Scott - I appreciate the help. 

There's nothing wrong with the system routines, but in this case I'm not
sure about 'my system'. I'm experimenting with VisualAge RPG just to
become familiar with it (why? - cause it's a language I don't know...
yet). Since I'm just getting my feet wet with the event driven approach
for this kind of RPG, I wanted to limit the complexities of the code so
I can get the most familiar with the basics of driving such an
application properly. So I wanted to avoid any system calls and keep it
just 'simple' code. And since my favourite way of learning a language is
writing a game in it, I was looking for a random number routine.
I have my own I wrote in COBOL using a modulus routine (X n+1 = P1 * Xn
+ P2) (Mod N) where P1 = 213239, P2 = 21337 and N = 1048573 and it works
pretty good, but was wondering if someone else had already done an RPG
version. I'll give yours (or a slight variation) a try.

Thanks again

Jim Wiant
Developer 
Foodstuffs, Akl., Ltd. 
This message has been sent from Foodstuffs (Auckland) Limited ("Foodstuffs").

The information contained in this message and or attachments 
is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged 
material. Any review, retransmission, dissemination or other 
use of, or taking of any action in reliance upon, this 
information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, 
please contact the sender and delete the material from any 
system and destroy any copies.

The views and opinions expressed in this message may be those
of the individual and not necessarily those of Foodstuffs, 
and are not given or endorsed by it.

Please note that this communication does not designate an 
information system for the purposes of the Electronic 
Transactions Act 2002.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.