The (documented) default in Free Pascal is a console app, so there is no need to force this.Originally Posted by cairnswm
Huh, why? There is no need to teach this man floating point yet.Originally Posted by cairnswm
This is because you haven't randomized the random generator yet. Computers are highly predictable devices, each time you run your program, the random number it starts with is the same.Originally Posted by eJay
To counter this, call "randomize" at the begin of your program, i.e.:
[pascal]
begin
randomize;
[/pascal]
A call to randomize will put the random generator in a ruly random state, so each time you run your program the result will be different.
Bookmarks