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

本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh

Tcl