2 !!DESCRIPTION!! variable initialization
\r
3 !!ORIGIN!! LCC 4.1 Testsuite
\r
4 !!LICENCE!! own, freely distributeable for non-profit. read CPYRIGHT.LCC
\r
7 /* todo: add back conditional stuff here ! */
\r
9 typedef struct { int codes[3]; char name[6]; } Word;
\r
11 #ifdef NO_IMPLICIT_FUNC_PROTOTYPES
13 #ifdef NO_OLD_FUNC_DECL
\r
28 { { 4, 5 }, { 'f', 'o', 'r' } },
\r
30 { { 9, 10, 11,}, 'w', 'h', 'i', 'l', 'e', },
\r
32 }, *wordlist = words;
\r
37 { { 4, 5 }, { 'f', 'o', 'r' } },
\r
38 {{6, 7, 8}, "else"},
\r
39 { { 9, 10, 11}, {'w', 'h', 'i', 'l', 'e', }},
\r
41 }, *wordlist = words;
\r
43 /*int x[][5] = { 1, 2, 3, 4, 0, { 5, 6 }, { 7 } };*/
\r
44 int x[][5] = { {1, 2, 3, 4, 0 }, { 5, 6 }, { 7 } };
\r
45 int *y[] = { x[0], x[1], x[2], 0 };
51 for (i = 0; y[i]; i++) {
\r
52 for (j = 0; y[i][j]; j++)
\r
53 printf(" %d", y[i][j]);
\r
62 static char *keywords[] = {"if", "for", "else", "while", 0, };
\r
65 for (p = keywords; *p; p++)
\r
69 #ifdef NO_OLD_FUNC_DECL
\r
78 for ( ; p->codes[0]; p++) {
\r
79 for (i = 0; i < sizeof p->codes/sizeof(p->codes[0]); i++)
\r
80 printf("%d ", p->codes[i]);
\r
81 printf("%s\n", p->name);
\r
90 for (i = 0; i < sizeof(words)/sizeof(Word); i++)
\r
91 printf("%d %d %d %s\n", words[i].codes[0],
\r
92 words[i].codes[1], words[i].codes[2],
\r