Global Information Lookup Global Information

Automatic variable information


In computer programming, an automatic variable is a local variable which is allocated and deallocated automatically when program flow enters and leaves the variable's scope. The scope is the lexical context, particularly the function or block in which a variable is defined. Local data is typically (in most languages) invisible outside the function or lexical context where it is defined. Local data is also invisible and inaccessible to a called function,[note 1] but is not deallocated, coming back in scope as the execution thread returns to the caller.

Automatic local variables primarily applies to recursive lexically-scoped languages.[note 2] Automatic local variables are normally allocated in the stack frame of the procedure in which they are declared.[note 3] This was originally done to achieve re-entrancy and allowing recursion,[note 4] a consideration that still applies today. The concept of automatic variables in recursive (and nested) functions in a lexically scoped language was introduced to the wider audience with ALGOL in the late 1950s, and further popularized by its many descendants.

The term local variable is usually synonymous with automatic variable, since these are the same thing in many programming languages, but local is more general – most local variables are automatic local variables, but static local variables also exist, notably in C. For a static local variable, the allocation is static (the lifetime is the entire program execution), not automatic, but it is only in scope during the execution of the function.
Cite error: There are <ref group=note> tags on this page, but the references will not show without a {{reflist|group=note}} template (see the help page).

and 19 Related for: Automatic variable information

Request time (Page generated in 0.8121 seconds.)

Automatic variable

Last Update:

programming, an automatic variable is a local variable which is allocated and deallocated automatically when program flow enters and leaves the variable's scope...

Word Count : 767

Automatic differentiation

Last Update:

finmath-lib stochastic automatic differentiation, Automatic differentiation for random variables (Java implementation of the stochastic automatic differentiation)...

Word Count : 6047

Static variable

Last Update:

entire run of the program. This is in contrast to shorter-lived automatic variables, whose storage is stack allocated and deallocated on the call stack;...

Word Count : 966

External variable

Last Update:

language, an external variable is a variable defined outside any function block. On the other hand, a local (automatic) variable is a variable defined inside...

Word Count : 1455

Automatic transmission

Last Update:

controls, and a torque converter. Other types of automatic transmissions include continuously variable transmissions (CVT), automated manual transmissions...

Word Count : 5044

Automatic

Last Update:

2020 Automatic transmission, or a car with an automatic transmission Automatic Knives Automatic firearm Automatic variable Automatic watch Automatic (automobile...

Word Count : 478

Local variable

Last Update:

languages provide lexically scoped local variables. In most languages, local variables are automatic variables stored on the call stack directly. This...

Word Count : 972

Continuously variable transmission

Last Update:

A continuously variable transmission (CVT) is an automated transmission that can change through a continuous range of gear ratios. This contrasts with...

Word Count : 4871

Object lifetime

Last Update:

lifetime coincides with variable lifetime of a variable with that object as value (both for static variables and automatic variables), but in general, object...

Word Count : 3558

Kawasaki Ninja 600R

Last Update:

Electronic Suspension Control System (ESCS), meaning to improve the Automatic Variable Damping System (AVDS) suspension from the original GPZ. The GPX had...

Word Count : 122

Resource acquisition is initialization

Last Update:

case of automatic variables. RAII ties resources to object lifetime, which may not coincide with entry and exit of a scope. (Notably variables allocated...

Word Count : 1984

EDVAC

Last Update:

EDVAC (Electronic Discrete Variable Automatic Computer) was one of the earliest electronic computers. It was built by Moore School of Electrical Engineering...

Word Count : 1255

Random variable

Last Update:

A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which...

Word Count : 6423

Variable gauge

Last Update:

1999[clarification needed] European Automatic Track Gauge Changeover Systems, UIC-backed study of different variable gauge systems Talgo's variable gauge system explained...

Word Count : 4842

Environment variable

Last Update:

environment variable is a user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of...

Word Count : 10249

Autotransformer

Last Update:

adjustment can be manual or automatic. The manual type is applicable only for relatively low voltage and is known as a variable AC transformer (often referred...

Word Count : 2272

Variable air volume

Last Update:

Variable air volume (VAV) is a type of heating, ventilating, and/or air-conditioning (HVAC) system. Unlike constant air volume (CAV) systems, which supply...

Word Count : 1595

M27 Infantry Automatic Rifle

Last Update:

The M27 Infantry Automatic Rifle (IAR) is a 5.56mm, select-fire assault rifle, based on the HK416 by Heckler & Koch. It is used by the United States Marine...

Word Count : 4092

C dynamic memory allocation

Last Update:

program; automatic-duration variables are allocated on the stack and come and go as functions are called and return. For static-duration and automatic-duration...

Word Count : 4126

PDF Search Engine © AllGlobal.net