On 5 Apr 2000, at 18:30, Peter Gerwinski wrote:
What does GCC do on the same platforms?
("mod" is "%" in C.)
Unfortunately, that won't help define what Pascal should do (I think that is what you are implying here -- apologies if it is not). The semantics of mod varies among languages, so deciding what C does isn't applicable.
For example, 6 mod -90 is an error in Standard and Extended Pascal. 6 mod -90 is legal in Ada and is -84. I don't have the Fortran or C standards available, so I don't know what they say.
According to the GPC documentation, it supports:
--standard-pascal-level-0 --standard-pascal --extended-pascal --object-pascal --borland-pascal --pascal-sc
My last note specified how mod must work for EP (and SP, as it turns out). So someone needs to check the OP, BP, and PSC standards, if such exist, to see how mod should be implemented for each of those dialects. If there are no such standards, then determining by testing how OP, BP, and PSC actually work would be appropriate.
Actually, I suppose if no dialect is specified, GPC could adopt the C semantics for mod if desired....
-- Dave