[comp.sys.mac] About mod operator in THINK Pascal 2.0...

bordier@imag.imag.fr (Jerome Bordier) (02/20/89)

Two friends of mine were recently abused by mod operator in THINK Pascal
version 2.0. : the definition of mod as implemented in version 1.0 was
changed in version 2.0.
In fact 2.0 definition is the same as MPW Pascal, Lisa Pascal...
The 1.0 definition is more satisfactory for mathematicians (my friends are
brilliant ones, not me).
The difference can be seen when applying mod to negative numbers.
Be aware of it, you will save debug time.

PS: I apologise if this fact was pointed out before in these newsgroups.

-- 
Jerome BORDIER   Laboratoire Structures Discretes  Institut IMAG
		 B.P. 53 X      38041 GRENOBLE Cedex   France
E.Mail:
bordier@imag.fr  OR  bordier@imag.UUCP (uunet.uu.net!imag!bordier)