Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Alkyr asked how to generate a random number in Informix SPL. Jean Sagi said IDS has no built-in generator. Doug Lawry pointed to Jonathan Leffler's SPL implementation in the IIUG software archive. Leffler noted it uses the 1989 C standard pseudo-random example, is not a good generator and is useless for cryptography, and suggested Knuth for more.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Jean Sagi — — source: Usenet: comp.databases.informix
AFAIK IDS does not have a random number generator so you have to do it
yourself, in SPL, C, Java...
J.
alkyr escribi':
> Is there a way to generate a random number through an Informix SPL? If
> not is there any other way to generate a random number within a
> specified range?
>
>
> Thanks
> Alex
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Is there a way to generate a random number through an Informix SPL? If
not is there any other way to generate a random number within a
specified range?
Thanks
Alex
Searching for "random number generator" at
http://groups.google.com/group/comp.databases.informix
points to Jonathan Leffler's implementation:
http://www.iiug.org/software/archive/random_spl
Regards,
Doug Lawry
www.douglawry.webhop.org
"alkyr" <alexis.kyriakides@gmail.com> wrote in message
news:1157611613.766307.133640@m73g2000cwd.googlegroups.com...
> Is there a way to generate a random number through an Informix SPL? If
> not is there any other way to generate a random number within a
> specified range?
> Thanks
> Alex
On 9/7/06, Doug Lawry <lawry@nildram.co.uk> wrote:
> "alkyr" <alexis.kyriakides@gmail.com> wrote:
> > Is there a way to generate a random number through an Informix SPL? If
> > not is there any other way to generate a random number within a
> > specified range?
> Searching for "random number generator" at
>
> http://groups.google.com/group/comp.databases.informix
>
> points to Jonathan Leffler's implementation:
>
> http://www.iiug.org/software/archive/random_spl
The only thing to note is that it uses the pseudo-random number
generator suggested in the (1989) C standard as an illustration. It
is not a particularly good random number generator; it certainly is
not any use for cryptography, for example. If you need to know more,
look at Knuth (Vol 2, Semi-Numerical Methods, IIRC). Or search PRNG
(pseudo-random number generator) at Google groups.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.