I fully agree with you that GPC should give an error if there is calculated something that is not defined the same in different pascal dialects. At least it should give a warning message as "MOD with negative operands can lead to different results on different platforms and pascal dialects".
I searched for hours and went mad when I saw that my program "worked" on many platforms but mine :-)
BTW : It was just a little "nonsense" program that I had to write for the practice lessons at university.
Thanks to you all. Tim
----- Original Message ----- From: Peter Gerwinski peter@gerwinski.de To: gpc@gnu.de Sent: Thursday, April 06, 2000 2:19 PM Subject: Re: 6 MOD -90 Problem on Windows
So GPC should support two variants: EP (runtime error for "mod -42") and BP (positive result).
I vote for the EP variant being the default behaviour with the BP variant being enabled in --borland-pascal and --delphi mode
- plus an option to set it explicitly.
And it must be the same behaviour for all platforms. Leaving it undefined invites for very unpleasant errors in future user programs.
Peter
-- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: ftp://ftp.gerwinski.de/pub/keys/ - AntiSpam: http://spam.abuse.net