Content deleted Content added
m Robot: Changing template to main article/s |
R. S. Shaw (talk | contribs) m function stack -> call stack |
||
Line 1:
In [[computer science]], a '''local variable''' is a [[variable]] that is given ''local [[scope (programming)|scope]]''. Such variables are accessible only from the [[Subroutine|function]] or [[block]] in which it is declared.
Local variables are special because in most languages they are stored on the [[
Some advocate that all variables should be of local scope to avoid issues with [[Side-effect (computer science)|side-effects]]. In other cases, programming paradigms and languages themselves, such as the [[functional programming]] paradigm and the [[Haskell programming language|Haskell]] language require all "variables" (or the closest equivalent under that paradigm to variables) to be of local scope, and the functionality of the program is achieved only by passing local variables from one function to another.
|