local variable
Also found in: Dictionary, Thesaurus, Medical, Financial, Acronyms, Wikipedia.
local variable
[′lō·kəl ′ver·ē·ə·bəl] (computer science)
A variable which can be accessed (used or changed) only in one block of a computer program.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.
local variable
(programming)A variable with lexical scope, i.e. one
which only exists in some particular part of the source code, typically within a block or a function or
procedure body. This contrasts with a global variable,
which is defined throughout the whole program.
Code is easier to understand when the scope of variables is as small as possible because it is easier to see how the variable is set and used. Code containing global variables is harder to modify because they create more interdependencies between sections of code.
Code is easier to understand when the scope of variables is as small as possible because it is easier to see how the variable is set and used. Code containing global variables is harder to modify because they create more interdependencies between sections of code.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
local variable
In programming, a variable used only within the routine or function it is defined in. When the function is finished and control is returned back to the part of the program that called it, the local variables no longer exist. Contrast with global variable.Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.