Mail Archives: djgpp/1997/07/25/22:17:12
Andrew Crabtree wrote:
> If I compile the following code
>
> #include <stdio.h>
> int f()
> {
> return 5;
> }
>
> int x = f();
...
> As C the compiler complains that it is using a non-constant
> initializer.
This is a valid complaint -- you are not writing good ANSI C. In C, an
initializer (what's on the right side of the = sign when you are defining
a variable) must be a compile-time constant.
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Love is not love which alters / when it alternation finds."
/ William Shakespeare, _Sonnets_, 116
- Raw text -