{"id":6364,"date":"2022-12-20T18:58:14","date_gmt":"2022-12-20T21:58:14","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/lappend-mann\/"},"modified":"2022-12-20T18:58:14","modified_gmt":"2022-12-20T21:58:14","slug":"lappend-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/lappend-mann\/","title":{"rendered":"lappend (mann)"},"content":{"rendered":"<h1 align=\"center\">lappend<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/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\">lappend \u2212 Append list elements onto a variable<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lappend<\/b> <i>varName<\/i> ?<i>value value value &#8230;<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This command treats the variable given by <i>varName<\/i> as a list and appends each of the <i>value<\/i> arguments to that list as a separate element, with spaces between elements. If <i>varName<\/i> does not exist, it is created as a list with elements given by the <i>value<\/i> arguments. <b>Lappend<\/b> is similar to <b>append<\/b> except that the <i>value<\/i>s are appended as list elements rather than raw text. This command provides a relatively efficient way to build up large lists. For example, \u201c<b>lappend a $b<\/b>\u201d is much more efficient than \u201c<b>set a [concat $a [list $b]]<\/b>\u201d when <b>$a<\/b> is long.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Using <b>lappend<\/b> to build up a list of numbers.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">% set var 1 <br \/> 1 <br \/> % <b>lappend<\/b> var 2 <br \/> 1 2 <br \/> % <b>lappend<\/b> var 3 4 5 <br \/> 1 2 3 4 5<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">list(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">append, element, list, variable<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  lappend \u2212 Append list elements onto a variable <\/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":[2943,2635],"class_list":["post-6364","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-lappend","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6364","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=6364"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6364\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}