[fpc-devel] -1 mod 3
JeLlyFish.software at gmx.net
Wed Nov 5 18:04:01 CET 2008
> Florian Klaempfl a écrit :
>> Dmitry Lizorkin schrieb:
>>>> I agree, no real life need.
>>> Except probably for my 150 students to whom i can no longer recommend
>>> FPC as a reference implementation.
>> Hopefully they won't be schocked when being hit by another real world
>> programming language implementing mod like it is implemented in computer
> Unless they make use of Ada.
Which just has both, that's all. ;)
As an alternative one could read some other language reference manuals
and notice that - surprisingly - at least two of the more common "real
world languages" don't even have a "modulo" operation:
-- 8< --
6.5.5 Multiplicative operators
5 The result of the / operator is the quotient from the division of the
first operand by the second; the result of the % operator is the
-- 8< --
So, IMO somebody at Borland got it wrong, just because someone at Intel
did it that way - and this has definitely and absolutely nothing to do
with a "computer science implementation".
More information about the fpc-devel