Scroll to navigation

global(3tcl) Tcl Built-In Commands global(3tcl)

NAME

global - 訪問全局變量

總覽 SYNOPSIS

global varname ?varname ...?

 
 

描述 DESCRIPTION

除非正在解釋一個 Tcl 過程否則忽略這個命令。如果正在解釋一個 Tcl 過程,則它聲明這些給定的 varname 是全局變量而不是局部變量。全局變量是在全局名字空間中的變量。在這個當前過程的持續期間(duration)(並且只有在當前過程中執行的時候),對 varname 中任何一個的任何引用都將參照(refer to)叫相同名字的全局變量。
Please note that this is done by creating local variables that are linked to the global variables, and therefore that these variables will be listed by info locals like all other local variables.
 

參見 SEE ALSO

namespace(n), upvar(n), variable(n)
 

關鍵字 KEYWORDS

global, namespace, procedure, variable
 

[中文版維護人]

寒蟬退士

[中文版最新更新]

2001/09/02

《中國 Linux 論壇 man 手冊頁翻譯計劃》:

http://cmpp.linuxforum.net
Tcl