翻訳と辞書
Words near each other
・ Static Shock
・ Static single assignment form
・ Static spacetime
・ Static spherically symmetric perfect fluid
・ Static stability
・ Static stretching
・ Static synchronous compensator
・ Static Taxi
・ Static Television
・ Static Tensions
・ Static Thought
・ Static timing analysis
・ Static trapeze
・ Static universe
・ Static VAR compensator
Static variable
・ Static War Headquarters Castlegate
・ Static Weather
・ Static web page
・ Static World View
・ Static, Kentucky and Tennessee
・ Static-X
・ Static-X discography
・ Static/Crash
・ Statical determinacy
・ Statically indeterminate
・ Statics
・ Statielli
・ Statignatha
・ Statik Link


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Static variable : ウィキペディア英語版
Static variable

In computer programming, a static variable is a variable that has been allocated statically—whose lifetime or "extent" extends across the entire run of the program. This is in contrast to the more ephemeral automatic variables (local variables are generally automatic), whose storage is allocated and deallocated on the call stack; and in contrast to objects whose storage is dynamically allocated in heap memory.
When the program (executable or library) is loaded into memory, static variables are stored in the data segment of the program's address space (if initialized), or the BSS segment (if uninitialized), and are stored in corresponding sections of object files prior to loading.
The static keyword is used in C and related languages both for static variables and other concepts.
==Scope==

In terms of scope and extent, static variables have extent the entire run of the program, but may have more limited scope. A basic distinction is between a ''static global variable'', which has global scope and thus is in context throughout the program, and a ''static local variable,'' which has local scope. A static local variable is different from local variable. It is initialized only once no matter how many times that function in which it resides is called. It may be used as a count variable. A static variable may also have module scope or some variant, such as internal linkage in C, which is a form of file scope or module scope.
In object-oriented programming, there is also the concept of a ''static member variable'', which is a "class variable" of a statically defined class – a member variable of a given class which is shared across all instances (objects), and is accessible as a member variable of these objects. Note however that a class variable of a dynamically defined class, in languages where classes can be defined at run time, is allocated when the class is defined and is not static.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Static variable」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.