(*********** Return-Path: stolfi@src.dec.com Received: by jumbo.pa.dec.com; id AA24947; Wed, 6 May 92 20:51:47 -0700 From: stolfi (Jorge Stolfi) Message-Id: <9205070351.AA24947@jumbo.pa.dec.com> Date: Wed, 6 May 92 20:51:45 PDT To: kalsow, muller X-Folder-Carbon: sw-m3 Subject: INC(c) when c is CHAR Bill and Eric, It appears that the current compiler does not check for overflow on INC(c) when c is CHAR. Is this a know limitation? According to the book, INC(c, 1) should be equivalent to c := VAL(ORD(c) + 1, CHAR); however, the following program ****************) MODULE Test EXPORTS Main; VAR c: CHAR; BEGIN c := 'a'; FOR i := 0 TO 300 DO INC(c, 1) END; c := 'a'; FOR i := 0 TO 300 DO c := VAL(ORD(c) + 1, CHAR) END; END Test. (***************** bombs out only in the *second* loop. --jorge *******************)