aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2019-11-06 17:04:20 +1000
committerSteve Bennett <steveb@workware.net.au>2019-11-06 17:04:20 +1000
commit3f40d4c5ad3628bc5bf7609ac48643570e04efa5 (patch)
treed5f2353984fc2014add39512a00be4492d0a483e
parent4e275fac3626fd00c02f13a0205fba17aa45fab9 (diff)
downloadjimtcl-3f40d4c5ad3628bc5bf7609ac48643570e04efa5.zip
jimtcl-3f40d4c5ad3628bc5bf7609ac48643570e04efa5.tar.gz
jimtcl-3f40d4c5ad3628bc5bf7609ac48643570e04efa5.tar.bz2
docs: Remove docs for the case command
This command no longer exists in Jim Tcl, so remove it from the documentation. Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim_tcl.txt64
1 files changed, 2 insertions, 62 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index e408e37..bbf3f59 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -1738,68 +1738,8 @@ to signal the innermost containing loop command to return immediately.
case
~~~~
-+*case* 'string' ?in? 'patList body ?patList body ...?'+
-
-+*case* 'string' ?in? {'patList body ?patList body ...?'}+
-
-*Note* that the `switch` command should generally be preferred unless compatibility
-with Tcl 6.x is desired.
-
-Match +'string'+ against each of the +'patList'+ arguments
-in order. If one matches, then evaluate the following +'body'+ argument
-by passing it recursively to the Tcl interpreter, and return the result
-of that evaluation. Each +'patList'+ argument consists of a single
-pattern or list of patterns. Each pattern may contain any of the wild-cards
-described under `string match`.
-
-If a +'patList'+ argument is +default+, the corresponding body will be
-evaluated if no +'patList'+ matches +'string'+. If no +'patList'+ argument
-matches +'string'+ and no default is given, then the `case` command returns
-an empty string.
-
-Two syntaxes are provided.
-
-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 +'patList'+ arguments are in braces in the second form,
-no command or variable substitutions are performed on them; this makes
-the behaviour of the second form different than the first form in some
-cases.
-
-Below are some examples of `case` commands:
-
- case abc in {a b} {format 1} default {format 2} a* {format 3}
-
-will return '3',
-
- case a in {
- {a b} {format 1}
- default {format 2}
- a* {format 3}
- }
-
-will return '1', and
-
- case xyz {
- {a b}
- {format 1}
- default
- {format 2}
- a*
- {format 3}
- }
-
-will return '2'.
+The obsolete '+*case*+' command has been removed from Jim Tcl since v0.75.
+Use `switch` instead.
catch
~~~~~