{"id":6195,"date":"2022-12-20T18:58:01","date_gmt":"2022-12-20T21:58:01","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/global-mann\/"},"modified":"2022-12-20T18:58:01","modified_gmt":"2022-12-20T21:58:01","slug":"global-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/global-mann\/","title":{"rendered":"global (mann)"},"content":{"rendered":"<h1 align=\"center\">global<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">global \u2212 Access global variables<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>global<\/b> ?<i>varname &#8230;<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This command has no effect unless executed in the context of a proc body. If the <b>global<\/b> command is executed in the context of a proc body, it creates local variables linked to the corresponding global variables (though these linked variables, like those created by <b>upvar<\/b>, are not included in the list returned by <b>info locals<\/b>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <i>varname<\/i> contains namespace qualifiers, the local variable\u2019s name is the unqualified name of the global variable, as determined by the <b>namespace tail<\/b> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>varname<\/i> is always treated as the name of a variable, not an array element. An error is returned if the name looks like an array element, such as <b>a(b)<\/b>.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This procedure sets the namespace variable <i>::a::x<\/i><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">proc reset {} { <b><br \/> global<\/b> a::x <br \/> set x 0 <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This procedure accumulates the strings passed to it in a global buffer, separated by newlines. It is useful for situations when you want to build a message piece-by-piece (as if with <b>puts<\/b>) but send that full message in a single piece (e.g. over a connection opened with <b>socket<\/b> or as part of a counted HTTP response).<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">proc accum {string} { <b><br \/> global<\/b> accumulator <br \/> append accumulator $string n <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">namespace(n), upvar(n), variable(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">global, namespace, procedure, variable<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  global \u2212 Access global variables <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2828,2635],"class_list":["post-6195","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-global","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6195"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6195\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}