comp.lang.ada
 help / color / mirror / Atom feed
* PRECEDENCE RULES (WAS
@ 1993-07-01 23:05 concert!news-feed-1.peachnet.edu!umn.edu!csus.edu!netcom.com!netcomsv!nit
  0 siblings, 0 replies; only message in thread
From: concert!news-feed-1.peachnet.edu!umn.edu!csus.edu!netcom.com!netcomsv!nit @ 1993-07-01 23:05 UTC (permalink / raw)


On 29 Jun 93, Richard A. O'keefe posted to All:

RO. The Pascal standard (IOS/EIC 7185:1990) says that
  . (i mod j) is an error if j <= 0.  That surprised me, I hadn't realised
  . that it was defined for i < 0.  It goes on to point out explicitly
  . "Only for i >= 0 and j > 0 does the relation (i div j)*j + i mod j = i
  . hold." _That_ stunned me.  i div j and i mod j both defined for negative i,
  . but not compatibly?

As a former member of the Joint Pascal Committee who attended the meeting 
where the rule regarding mod was voted upon, I remember a very long and
heated discussion over the relative merits of three different positions.
The first was what was called the "FORTRAN rule", the second was the position
favored by mathematicians, while the third was the inconsistent one finally
selected.  Alas, I was in the minority.

The meeting was held in a conference room at the University of Colorado's
computer center.  Many of us found it more enjoyable to go outside of the
room and help students correct their Pascal programs than to sit in the room
and listen to this jibberish...

Regards, Mikey <michael.hagerty@nitelog.com>
---
 . MR/2 1.51 #63 . This is your brain.  Postscript on brain your is This.
                                                       

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-07-01 23:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-07-01 23:05 PRECEDENCE RULES (WAS concert!news-feed-1.peachnet.edu!umn.edu!csus.edu!netcom.com!netcomsv!nit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox