Following on from this discussion: http://www.8052.com/forum/read.phtml?id=84814 Keil C51 v7.50 rejects the following:
char key_tbl[][] = { { 4, 3, 2, 1 }, // row 0 { 8, 7, 6, 5 }, // row 1 { 12, 11, 10, 9 }, // row 2 { 16, 15, 14, 13 }, // row 3 };
MAIN.C(27): error C163: 'key_tbl': unknown array size
<quote> "Out of 'The C programming language' section A8.6.2" Which edition of the book is that? Mine's the 2nd Edition, marked "Based on Draft-Proposed ANSI C," and contains that very paragraph. However, The ISO/IEC 9899:1990 standard doesn't - that's where all the stuff about fully-bracketed initialisers comes from (Section 6.5.7). </quote> My copy is Second Edition -- ANSI C. As others have mentioned I don't see where KEIL says which ANSI C standard they are trying to meet. I've always assumed ANSI-83 ( 83 is the 1st one isn't it? ). :-) Frodak
I've always assumed ANSI-83 ( 83 is the 1st one isn't it? No, it's C89 (ANSI) a.k.a. C90 (ISO edition of same). There was no earlier edition. Before ANSI C89, there was no formal standard definition of C, so the book written by the makers of C served that purpose.