On 20/05/17 13:00, Martin Schreiber wrote:
Hi,
FPC fixes_3_0, Linux X86:"var i1: int32;begin for i1:= 0 to 5 do begin  
writeln(random(int32(-16))); end; writeln('*************'); for i1:= 0 to 5 do begin  
writeln(random(int64(-16))); end;end;"
produces"-9-9-11-13-10-13*************395468"Is this intended? If not, which one is 
correct?https://www.freepascal.org/docs-html/current/rtl/system/random.htmlstates for 32 and 64 
bit"Random returns a random number larger or equal to 0 and strictly less than L."which raises the 
question, what means "less"?

What does it do if the parameter is +ve? Note https://mantis.freepascal.org/view.php?id=31693

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to