Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!tandem!netcom!rkitts From: rkitts@netcom.COM (Rick Kitts) Newsgroups: comp.sys.amiga.advocacy Subject: Re: A change to the C++ standard Message-ID: <1991Apr6.181330.12144@netcom.COM> Date: 6 Apr 91 18:13:30 GMT References: <2264@winnie.fit.edu> Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 26 In article <2264@winnie.fit.edu> rcs91900@zach.fit.edu ( Charles Stockman /ADVISOR-Clutterham) writes: >I am writing a C++ compiler and have one quick question > >In C/C++ Octal is defined as > > 012 (octal) --> 10 (decimal) > >Instead of starting octals off with a 0 I am planning to start them of with >0o > > 0o12 (octal) --> 10 (decimal) > >The reason is that I want to make it easier to build the scanner. > [...] What type of scanner do you plan to build? I assume that you will be using a greedy algorithm, meaning that it will be a simple thing to check first that the constant starts with a 0 and that it does or does not contain a decimal point. I think that you might wish to re-examine your scanner design if this is in fact a real problem. >Well --> What do you think, should I change it or keep it the same ? Not using octal constants myself I really don't care very much. But I must tell you that a compiler would have to generate outrageously efficient code for me to purchase it if it did not conform to the standard.