[Gambas-user] Random Numbers Functions info

Jussi Lahtinen jussi.lahtinen at gmail.com
Mon May 9 23:52:24 CEST 2022


>
> I would like to understand how it works with gambas for both randomness
> and predictability.
>

Randomize X
If X is constant, then RND will always return the same sequence.
Example:

Randomize 1
Print Rnd

Returns sequence, always starting with value: 0.997366224643343

If the X is random, then (example from /dev/random) then you will get a
randomly chosen sequence. IE "random", in some sense practically
non-predictable number sequence.
This is how random number generation works in most languages.

Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220510/4014071e/attachment.htm>


More information about the User mailing list