{"id":6318,"date":"2022-12-20T18:58:09","date_gmt":"2022-12-20T21:58:09","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/case-mann\/"},"modified":"2022-12-20T18:58:09","modified_gmt":"2022-12-20T21:58:09","slug":"case-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/case-mann\/","title":{"rendered":"case (mann)"},"content":{"rendered":"<h1 align=\"center\">case<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/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\">case \u2212 Evaluate one of several scripts, depending on a given value<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>case<\/b> <i>string<\/i> ?<b>in<\/b>? <i>patList body<\/i> ?<i>patList body<\/i> &#8230;?<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>case<\/b> <i>string<\/i> ?<b>in<\/b>? {<i>patList body<\/i> ?<i>patList body<\/i> &#8230;?} ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Note: the<\/i> <b>case<\/b> <i>command is obsolete and is supported only for backward compatibility. At some point in the future it may be removed entirely. You should use the<\/i> <b>switch<\/b> <i>command instead.<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>case<\/b> command matches <i>string<\/i> against each of the <i>patList<\/i> arguments in order. Each <i>patList<\/i> argument is a list of one or more patterns. If any of these patterns matches <i>string<\/i> then <b>case<\/b> evaluates the following <i>body<\/i> argument by passing it recursively to the Tcl interpreter and returns the result of that evaluation. Each <i>patList<\/i> argument consists of a single pattern or list of patterns. Each pattern may contain any of the wild-cards described under <b>string match<\/b>. If a <i>patList<\/i> argument is <b>default<\/b>, the corresponding body will be evaluated if no <i>patList<\/i> matches <i>string<\/i>. If no <i>patList<\/i> argument matches <i>string<\/i> and no default is given, then the <b>case<\/b> command returns an empty string.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Two syntaxes are provided for the <i>patList<\/i> and <i>body<\/i> arguments. The first uses a separate argument for each of the patterns and commands; this form is convenient if substitutions are desired on some of the patterns or commands. The second form places all of the patterns and commands together into a single argument; the argument must have proper list structure, with the elements of the list being the patterns and commands. The second form makes it easy to construct multi-line case commands, since the braces around the whole list make it unnecessary to include a backslash at the end of each line. Since the <i>patList<\/i> arguments are in braces in the second form, no command or variable substitutions are performed on them; this makes the behavior of the second form different than the first form in some cases.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">switch(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">case, match, regular expression<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  case \u2212 Evaluate one of several scripts, depending on a given value <\/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":[2917,2635],"class_list":["post-6318","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-case","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6318","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=6318"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6318\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}