1
0
This commit is contained in:
dtb 2022-06-01 14:30:22 -04:00
parent a13fbc7d6d
commit 20fc284791

View File

@ -73,7 +73,7 @@ snippet.c:4:53: error: invalid digit "9" in octal constant
</PRE>
<P>
This is because in C (both pre-standardization and post-ANSI) integer constants with leading zeroes are parsed as octal (base 8) numbers.
In pre-ANSI C, <CODE>8</CODE> and <CODE>9</CODE> were valid octal digits corresponding to <CODE>010</CODE>(b8) and <CODE>11</CODE>(0b8).
In pre-ANSI C, <CODE>8</CODE> and <CODE>9</CODE> were valid octal digits corresponding to <CODE>010</CODE>(b8) and <CODE>011</CODE>(b8).
This is documented in <I>The C Programming Language</I>, Appendix A, subsection 2.4.1, and evidenced by the preceding code block.
The following is output of the compiled program in UNIX V6 on an emulated PDP-11:
</P>