[fpc-devel] Different results of random(int32) and random(int64) for negative limit value

Bart bartjunk64 at gmail.com
Sat May 20 22:59:44 CEST 2017


On 5/20/17, Jonas Maebe <jonas at freepascal.org> wrote:

> random(x) is undefined for negative parameters. It should have had an
> unsigned parameter, like in Turbo Pascal (where it is word). Delphi
> defines it as always returning a positive value, but I don't know what
> happens if you pass a negative parameter there.

I already reported that the documentation is a bit "off":
https://bugs.freepascal.org/view.php?id=31642

Bart



More information about the fpc-devel mailing list