Path: utzoo!mnetor!uunet!steinmetz!ge-dab!codas!peora!randy From: randy@peora.ccur.com (Randy Hendry) Newsgroups: comp.sys.amiga Subject: Re: Piggyback CPU boards (also legal C expressions) Message-ID: <2636@peora.ccur.com> Date: 16 Dec 87 17:14:51 GMT References: <8712111630.AA17999@cory.Berkeley.EDU> Organization: Concurrent Computer Corporation, Orlando, Fl Lines: 22 Summary: 08 09 legal K&R octal constants >>Speaking of things breaking, is a numeric constant of the form 08 or 09 >>strictly legal under K&R C? It showed up in an old C-A program compiled under > > Not legal. It is supposed to be octal. Legal (but strange): K&R p.180 2.4.1 Integer constants: "An integer constant consisting of a sequence of digits is taken to be octal if it begins with 0 (digit zero), decimal otherwise. The digits 8 and 9 have octal value 10 and 11 respectively." However, the ANSI draft states things differently. X3J11/87-140 (August 3, 1987) p.24 ll.27-29: "A decimal constant begins with a nonzero digit and consists of a sequence of decimal digits. An octal constant consists of the prefix 0 optionally followed by a sequence of the digits 0 throught 7 only." -- Randy Hendry randy@peora.ccur.com (305) 850-1040 Concurrent Computer Corporation 2486 Sand Lake Road, Orlando, FL 32809-7642