Variable (computer science)

variablevariablesscalarextentprogram variablescopeConstantvariable substitutionassignable variableenvironment variables
In computer programming, a variable or scalar is a storage location (identified by a memory address) paired with an associated symbolic name, which contains some known or unknown quantity of information referred to as a value.wikipedia
366 Related Articles

Reference (computer science)

referencereferencesHandle
The variable name is the usual way to reference the stored value, in addition to referring to the variable itself, depending on the context.
In computer science, a reference is a value that enables a program to indirectly access a particular datum, such as a variable's value or a record, in the computer's memory or in some other storage device.

Value (computer science)

valuevalueslvalue
In computer programming, a variable or scalar is a storage location (identified by a memory address) paired with an associated symbolic name, which contains some known or unknown quantity of information referred to as a value.
In languages with assignable variables it becomes necessary to distinguish between the r-value (or contents) and the l-value (or location) of a variable.

Assignment (computer science)

assignmentsingle assignmentassignment operator
In imperative programming languages, values can generally be accessed or changed at any time.
In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable.

Imperative programming

imperativeimperative programming languageimperative language
In imperative programming languages, values can generally be accessed or changed at any time.
Higher-level imperative languages use variables and more complex statements, but still follow the same paradigm.

Constant (computer programming)

constantconstantsconstant declarations
In imperative languages, the same behavior is exhibited by (named) constants (symbolic constants), which are typically contrasted with (normal) variables.
This is contrasted with a variable, which is an identifier with a value that can be changed during normal execution, i.e., the value is variable. Constants are useful for both programmers and compilers: For programmers they are a form of self-documenting code and allow reasoning about correctness, while for compilers they allow compile-time and

String (computer science)

stringstringscharacter string
Depending on the type system of a programming language, variables may only be able to store a specified datatype (e.g. integer or string).
Depending on the programming language and precise data type used, a variable declared to be a string may either cause storage in memory to be statically allocated for a predetermined maximum length or employ dynamic allocation to allow it to hold a variable number of elements.

Free variables and bound variables

free variablesbound variablebound
In pure functional and logic languages, variables are bound to expressions and keep a single value during their entire lifetime due to the requirements of referential transparency.
In computer programming, the term free variable refers to variables used in a function that are neither local variables nor parameters of that function.

Semaphore (programming)

semaphoressemaphorecounting semaphore
An identifier referencing a variable can be used to access the variable in order to read out the value, or alter the value, or edit other attributes of the variable, such as access permission, locks, semaphores, etc.
In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system.

Object lifetime

lifetimeobject destructionobject creation
Further, object lifetime may coincide with variable lifetime, but in many cases is not tied to variable lifetime.
In some cases object lifetime coincides with variable lifetime of a variable with that object as value (both for static variables and automatic variables), but in general object lifetime is not tied to the lifetime of any one variable.

Global variable

globalglobal environmentglobal variables
A "global variable", or one with indefinite scope, may be referred to anywhere in the program.
The set of all global variables is known as the global environment or global state. In compiled languages, global variables are generally static variables, whose extent (lifetime) is the entire runtime of the program, though in interpreted languages (including command-line interpreters), global variables are generally dynamically allocated when declared, since they are not known ahead of time.

Data type

typedatatypetypes
Depending on the type system of a programming language, variables may only be able to store a specified datatype (e.g. integer or string).

Local variable

localstatic local variablelexical (my) variables
Variables only accessible within a certain functions are termed "local variables".
In computer science, a local variable is a variable that is given local scope.

Uninitialized variable

uninitializeduninitialized memory
A variable whose scope begins before its extent does is said to be uninitialized and often has an undefined, arbitrary value if accessed (see wild pointer), since it has yet to be explicitly given a particular value.
In computing, an uninitialized variable is a variable that is declared but is not set to a definite known value before it is used.

Referential transparency

referentially transparentreferential safetyreferentially transparent positions
In pure functional and logic languages, variables are bound to expressions and keep a single value during their entire lifetime due to the requirements of referential transparency.
The term appeared in its contemporary computer science usage, in the discussion of variables in programming languages, in Christopher Strachey's seminal set of lecture notes Fundamental Concepts in Programming Languages (1967).

Scope (computer science)

scopelexical scopeLexical
In pure functional and logic languages, variables are bound to expressions and keep a single value during their entire lifetime due to the requirements of referential transparency. Common techniques for doing so are to have different sections of a program use different name spaces, or to make individual variables "private" through either dynamic variable scoping or lexical variable scoping.
In computer programming, the scope of a name binding—an association of a name to an entity, such as a variable—is the region of a computer program where the binding is valid: where the name can be used to refer to the entity.

Closure (computer programming)

closuresclosurelexical closure
A running program may enter and leave a given extent many times, as in the case of a closure.
The term closure is often used as a synonym for anonymous function, though strictly, an anonymous function is a function literal without a name, while a closure is an instance of a function, a value, whose non-local variables have been bound either to values or to storage locations (depending on the language; see the lexical environment section below).

Namespace

namespacesname spacehierarchical namespace
Common techniques for doing so are to have different sections of a program use different name spaces, or to make individual variables "private" through either dynamic variable scoping or lexical variable scoping.

Type system

dynamicstatictype checking
Depending on the type system of a programming language, variables may only be able to store a specified datatype (e.g. integer or string). In dynamically typed languages such as Python, it is values, not variables, which carry type.
In programming languages, a type system is a set of rules that assigns a property called type to the various constructs of a computer program, such as variables, expressions, functions or modules.

Variable (mathematics)

variablesvariableunknown
Variables in programming may not directly correspond to the concept of variables in mathematics.

Parameter (computer programming)

parameterparametersargument
the variable named is a parameter because it is given a value when the function is called.
In computer programming, a parameter or a formal argument, is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine.

Dereference operator

dereferencingdereferenceddereference
In imperative programming languages, values can generally be accessed or changed at any time.
For example, in a shell script is the dereference operator applied to the variable, while in Perl is a scalar variable called.

Python (programming language)

PythonPython programming languagePython 2
In dynamically typed languages such as Python, it is values, not variables, which carry type.

Object (computer science)

objectobjectsdata object
A value, however, is an abstraction, an idea; in implementation, a value is represented by some data object, which is stored somewhere in computer memory.
In computer science, an object can be a variable, a data structure, a function, or a method, and as such, is a value in memory referenced by an identifier.

Array data structure

arrayarraysvector
Single-character names are most commonly used only for auxiliary variables; for instance,, for array index variables.
In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key.

Sigil (computer programming)

sigilsigilssuffixes
In some programming languages, sigils (symbols or punctuation) are affixed to variable identifiers to indicate the variable's datatype or scope.
In computer programming, a sigil is a symbol affixed to a variable name, showing the variable's datatype or scope, usually a prefix, as in, where is the sigil.