[fpc-devel] Declare variables inside the code
Michael Schnell
mschnell at lumino.de
Wed May 11 09:48:44 CEST 2011
On 05/11/2011 09:30 AM, Marco van de Voort wrote:
> And C did it because it wanted to save stack space in the minis of the
> early seventies.
Independently from the location a local variable has been declared, the
compiler can decide in what section of the code it reserves stack place
for it. IMHO the reason is reusing the variable name, which in C can be
essential with complex macro declarations. You can reintroduce any
variable name in a {-} block without harming the variable with the same
name declared outside and used before and after the block .
-Michael
More information about the fpc-devel
mailing list