Help -
Glossary - R - Random
Squeak has a (pseudo) random number generator. Select the following three
lines and do Cmd-p:
| pseudoRandy |
pseudoRandy := Random new.
pseudoRandy nextInt: 100. "Produces a
pseudo-random integer between 0 and 100, not including 0".
Using Cmd-p and Cmd-z alternating
you can test this out. (You can also replace 100 by another integer.)
The term "pseudo" means that the integers produced mimick the behaviour of true
random series, but don't quite succeed, in the long run. If you consult the
class Random (select and use Cmd-b) you find the code and some
explanations.