Fóruns: Forum of Decimal BASIC (Thread #708713)

RANDOMIZE [seed]? (2024-09-10 05:30 by toml12953 #755618)

In the help file (accessed by pressing F1 with cursor on the keyword), the syntax of RANDOMIZE doesn't mention an optional seed.
I was converting from another BASIC and accidentally left the seed on the RANDOMIZE statement.
To my surprise, it didn't cause an error! I took off the seed and the random numbers were truly unpredictable
but when I put in a fixed seed, the random numbers were predictable. This is a very useful facility for debugging
programs. Perhaps you should document the optional seed parameter.

RANDOMIZE[seed]

Responder a #755618×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: RANDOMIZE [seed]? (2024-09-10 08:57 by SHIRAISHI Kazuo #755619)

I added a description about seed on the web help.
https://decimalbasic.web.fc2.com/English/html/basi6c31.htm
Help files will be revised in future.

Responder a #755618

Responder a #755619×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login