{"id":6082,"date":"2022-12-20T18:57:54","date_gmt":"2022-12-20T21:57:54","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/lrange-mann\/"},"modified":"2022-12-20T18:57:54","modified_gmt":"2022-12-20T21:57:54","slug":"lrange-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/lrange-mann\/","title":{"rendered":"lrange (mann)"},"content":{"rendered":"<h1 align=\"center\">lrange<\/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\">lrange \u2212 Return one or more adjacent elements from a list<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lrange<\/b> <i>list first last<\/i> ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>List<\/i> must be a valid Tcl list. This command will return a new list consisting of elements <i>first<\/i> through <i>last<\/i>, inclusive. The index values <i>first<\/i> and <i>last<\/i> are interpreted the same as index values for the command <b>string index<\/b>, supporting simple index arithmetic and indices relative to the end of the list. If <i>first<\/i> is less than zero, it is treated as if it were zero. If <i>last<\/i> is greater than or equal to the number of elements in the list, then it is treated as if it were <b>end<\/b>. If <i>first<\/i> is greater than <i>last<\/i> then an empty string is returned. Note: \u201c<b>lrange<\/b> <i>list first first<\/i>\u201d does not always produce the same result as \u201c<b>lindex<\/b> <i>list first<\/i>\u201d (although it often does for simple fields that are not enclosed in braces); it does, however, produce exactly the same results as \u201c<b>list [lindex<\/b> <i>list first<\/i><b>]<\/b>\u201d<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Selecting the first two elements:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">% <b>lrange<\/b> {a b c d e} 0 1 <br \/> a b<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Selecting the last three elements:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">% <b>lrange<\/b> {a b c d e} end-2 end <br \/> c d e<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Selecting everything except the first and last element:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">% <b>lrange<\/b> {a b c d e} 1 end-1 <br \/> b c d<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Selecting a single element with <b>lrange<\/b> is not the same as doing so with <b>lindex<\/b>:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">% set var {some {elements to} select} <br \/> some {elements to} select <br \/> % lindex $var 1 <br \/> elements to <br \/> % <b>lrange<\/b> $var 1 1 <br \/> {elements to}<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lreplace(n), lsort(n), string(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">element, list, range, sublist<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  lrange \u2212 Return one or more adjacent elements from a list <\/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":[2752,2635],"class_list":["post-6082","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-lrange","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6082","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=6082"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6082\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}