initialization
cottrell at nbs-vms.ARPA
cottrell at nbs-vms.ARPA
Sat Jan 12 02:08:19 AEST 1985
/*
bizarre idea time again! how about a 'data' statement? except we wouldn't
call it that. have a bunch of code before (outside) any functions are
defined. only stuff that the compiler could do as initialization (if the
syntax allowed it) would be legal. what am i talking about? try this:
int x[4];
union dues {
char p;
int q;
float r;
};
} z; /* ignore prev line, typing directly */
...
x[3] = 1;
z.r = 3.14159;
...
int func()
{ ...
}
one could even imagine for loops to initialize arrays, but this would
require the compiler to be an interpreter as well. oh well.
*/
More information about the Comp.lang.c
mailing list