[fpc-devel] -1 mod 3
florian at freepascal.org
Mon Oct 27 13:32:44 CET 2008
Dmitry Lizorkin schrieb:
> I was surprised to find out that the expression (-1 mod 3) yields -1 in
> Free Pascal. On the other hand, Pascal ISO 7185:1990, section 22.214.171.124)
> explicitly defines the `mod' operation "such that 0 <= i mod j < j".
> What do i miss here?
That FPC never claims to be iso compliant. -1 mod 3 evalutes to -1 for
most modern programming languages.
More information about the fpc-devel