memrootじしょ
英和翻訳
local variable
recurring idea
Lens filter
recurring thought
rectifier
emboldened
terminal velocity
be indispensable for
local variable
/ˌloʊkəl ˈvɛəriəbəl/
ローカル ヴァリアブル
1.
特定の関数やコードブロック内でのみアクセス可能な変数。
プログラム内で宣言された特定の関数やコードブロックの内部でのみ使用できる変数を指します。その関数やブロックの外部からは直接アクセスできません。これにより、名前の衝突を防ぎ、コードのモジュール性を高めることができます。
A
local
variable's
scope
is
limited
to
the
block
where
it
is
declared.
(ローカル変数のスコープは、それが宣言されたブロックに限定されます。)
A local variable's
「ローカル変数」の
scope
有効範囲、スコープ
is limited to
~に限定される
the block
ブロック(コードのまとまり)
where it is declared
それが宣言されている場所
You
cannot
access
a
local
variable
from
outside
its
defining
function.
(定義している関数の外部からローカル変数にアクセスすることはできません。)
You cannot access
あなたはアクセスできません
a local variable
ローカル変数に
from outside
~の外部から
its defining function
それを定義している関数
Each
time
the
function
is
called,
new
instances
of
its
local
variables
are
created.
(関数が呼び出されるたびに、そのローカル変数の新しいインスタンスが作成されます。)
Each time
~するたびに
the function is called
関数が呼び出される
new instances
新しいインスタンス(実体)
of its local variables
そのローカル変数の
are created
作成される
2.
関数やブロックの実行が終了すると自動的に破棄される一時的な変数。
ローカル変数は、それが宣言された関数やブロックが実行されている間だけメモリに存在し、関数やブロックの実行が終了すると自動的に破棄されます。これにより、メモリの効率的な利用が可能になり、不要なデータが残ることを防ぎます。
Local
variables
save
memory
as
they
are
temporary.
(ローカル変数は一時的なので、メモリを節約します。)
Local variables
ローカル変数は
save memory
メモリを節約します
as they are temporary
なぜならそれらは一時的だからです
Once
the
function
returns,
its
local
variables
are
no
longer
valid.
(関数が戻ると、そのローカル変数はもはや有効ではありません。)
Once the function returns
関数が戻るとすぐに
its local variables
そのローカル変数は
are no longer valid
もはや有効ではありません
The
lifetime
of
a
local
variable
is
tied
to
the
execution
of
its
containing
block.
(ローカル変数の生存期間は、それを含むブロックの実行に結びついています。)
The lifetime
生存期間
of a local variable
ローカル変数の
is tied to
~に結びついている
the execution
実行
of its containing block
それを含むブロックの
関連
global variable
scope
function
block
lifetime
stack