linked-in drivers once again
Vance Shipley
vances@REDACTED
Fri Jun 29 03:08:37 CEST 2001
I stand corrected. :)
In any event he was expecting it to be -1 so he still needed to
initialize it that way to get his code working.
-Vance
> That is an *automatic* variable, not a static one. Automatic variables
> can have (as your example shows) any value, static and external are
> initialized to 0.
>
> % cat > t.c
> static int var;
> main()
> {
> printf("var=%d\n", var);
> }
> % gcc t.c
> % ./a.out
> var=0
>
> Although I agree with your statement that uninitialized variables is a
> common cause of very confusing errors when you program in C.
>
> /Sebastian
More information about the erlang-questions
mailing list