I have two questions, actually. The first is I am a Game Programmer
and I would like to know if there is a way to get Random Numbers in
OpenVMS VAX v6.1. If there is could you mail it to me.
The second Question is I was wondering if you could send me some
programs that you use. This would help me greatly, and I would love
to have them.
Thank You for your time.
-< MTH$RANDOM + language RTLs >-
The standard runtime library contains a routine which implements a
mixed congruential method random number generator. By all accounts it's
an excellent generator. Of course it's quite simple to code your own.
MTH$RANDOM is only 9 machine instructions long, maybe 4 or 5 lines of
code in a high level language. Check out a good textbook on the
subject. Although it's very old, the definitive work is still
"The Art of Computer Programming, Vol 2, Seminumerical Algorithms,
Donald E. Knuth, Addison Wesley, 1969(!)"
Here's what HELP has to say about the routine:
$ help rtl mth$ mth$random
RTL_Routines
MTH$
MTH$RANDOM
The Random-Number Generator, Uniformly Distributed routine is a
general random-number generator.
Format:
MTH$RANDOM seed
ARGUMENT
seed
VMS usage: longword_unsigned
type: longword (unsigned)
access: modify
mechanism: by reference
The integer seed, a 32-bit number whose high-order 24 bits are
converted by MTH$RANDOM to an F_floating random number. The seed
argument is the address of an unsigned longword that contains this
integer seed. The seed is modified by each call to MTH$RANDOM.
Most languages implemented on OpenVMS also have their own run time
library routine for generating random numbers. See your language
documentation for details.
I'm not sure what you're asking here - most of the programs I use
regularly are commercial products. It works like this: you send us money,
we send you the program (source code is extra, *LOTS* extra). If you're
looking for sample programs, I'd suggest the Freeware CD, the DECUS
library, DSNlink, or the various web sites.