Local variable

From Computer History Wiki
Revision as of 22:38, 19 October 2017 by Jnc (talk | contribs) (An OK stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A local variable (also called automatic storage, etc) in a programming language is one that only has storage allocated for it when the procedure in which the variable is defined is entered, during the execution of the program. Once that particular invocation of the procedure is exited, the values of all the automatic variables in it disappear.

Automatic variables are usually implemented with a stack.