The static storage class limits the scope of a variable and
changes the lifetime of local variables. It is used as follows:
static data-typename <[>= value<]>;
Where
data-type
is the data type of the variable.
name
is the name of the variable.
value
is the value to assign to the variable.
When you use static to declare a variable outside a
function, that variable cannot be accessed outside the source file in
which it is declared.
When you use static to declare a variable inside a
function, that variable is initialized at startup (like other global
variables) and retains its value between calls to that function. It
is not reinitialized on entry to the function.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.