PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Automatic local variables and static local variables
Date: Tuesday, 03 Mar 2020, 19:31:51


    > Message Posted By: Unknown
    ...
    > What's the point of having persistent values in variables that only have
    > block scope?

Example:  Use a static local pointer to count how many
times that the block was executed and print out message
every 10000 times.

This can be done with a global variable, but such a
variable has global scope.

--Stan-
PREV INDEX NEXT