c - static keyword inside array [] brackets -



c - static keyword inside array [] brackets -

this question has reply here:

purpose of static keyword in array parameter of function 1 reply

i came across new utilize of static keyword. static mean here?

void fun(int some_array[static 7]);

edit : can give illustration can useful?

the standard says in 6.7.6.3:

a declaration of parameter ‘‘array of type’’ shall adjusted ‘‘qualified pointer type’’, type qualifiers (if any) specified within [ , ] of array type derivation. if the keyword static appears within [ , ] of array type derivation, each phone call function, value of corresponding actual argument shall provide access first element of array @ to the lowest degree many elements specified size expression.

it's feature introduced in c99. there have it: some_array must @ to the lowest degree 7 elements long.

as say, there can't new standard without new usage keyword static.

c arrays function static

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -