[fpc-devel] -1 mod 3

Dmitry Lizorkin lizorkin at ispras.ru
Mon Oct 27 13:27:00 CET 2008


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 explicitly 
defines the `mod' operation "such that 0 <= i mod j < j".
What do i miss here?

Thank you in advance,

More information about the fpc-devel mailing list