Valid Numbers (was Re: 0x47e+barney not considered C)

Johannes Heuft jh at pcsbst.UUCP
Tue Jul 26 17:01:55 AEST 1988


I ran into a similar problem (see 0x47e+barney) when writing a column of
FP numbers which I prepared automatically with the help of an editor.
For convenience, I used a pattern like "0000000.00" and replaced only some
zeroes where appropriate. The result looked like

       0001234.00
or
       0001912.00


The Microsoft C Compiler 5.0 (4.0?) accepted the first number and did the
correct conversion. However the second number caused an error message
saying that a non-octal digit was found in an octal (!!!) number.

Please be aware that I am familiar with scanners, parsers etc. Thus,
I don't need an explanation.

My only question: what does the standard say about well formed numbers?

		Johannes Heuft
		unido!pcsbst!jh



More information about the Comp.std.c mailing list