|
From: <vil...@ya...> - 2001-08-02 14:00:29
|
I don't understand what is like to declare a function as "static".
For example:
static void initBV() {
if (!inittedBV)
{
int i;
for (i=0; i<ArraySize(bV); i++)
bV[i] = -1;
bV['a'] = bV['A'] = A_B_V;
bV['b'] = bV['B'] = B_B_V;
bV['c'] = bV['C'] = C_B_V;
bV['d'] = bV['D'] = D_B_V;
bV['e'] = bV['E'] = E_B_V;
inittedBV = TRUE;
}
}
What is that code doing?
If I "malloc" something inside the function, what happens? Is the space
able to be freed outside of the function?
How is that "int i" variable managed, is it created always but not used
unless the "if" condition is true?
Can I put this kind of conditional declaration of functions in a non-static
function?
I don't know much of it, you see! :)
_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger: Comunicación instantánea gratis con tu gente -
http://messenger.yahoo.es
|