From 6d198b081ed55ded8eea2afd218f565bc5a4f951 Mon Sep 17 00:00:00 2001 From: Henrik Wallin <hedda@lysator.liu.se> Date: Thu, 15 Jan 1998 12:08:15 +0100 Subject: [PATCH] Switch har nu statements och inte expressions. Rev: tutorial/tutorial.wmml:1.66 --- tutorial/tutorial.wmml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tutorial/tutorial.wmml b/tutorial/tutorial.wmml index b4f09fa93c..d62b1de2da 100644 --- a/tutorial/tutorial.wmml +++ b/tutorial/tutorial.wmml @@ -965,19 +965,19 @@ expression and it can look something like this: switch ( expression ) { case constant1: - expressions1; + statement1; break; case constant2: - expressions2; + statement2; break; case constant3 .. constant4: - expressions3; + statement3; break; default: - expressions5; + statement5; } </example> As you can see, a switch statement is a bit more complicated than an @@ -994,7 +994,7 @@ that case statement as well. <p> One of the case statements in the above example differs in that it is a <b>range</b>. In this case, any value between <i>constant3</i> and -<i>constant4</i> will cause Pike to jump to <i>expressions3</i>. Note +<i>constant4</i> will cause Pike to jump to <i>statement3</i>. Note that the ranges are inclusive, so the values <i>constant3</i> and <i>constant4</i> are also valid. @@ -2466,7 +2466,6 @@ arguments to a suitable range. This means that <li> No errors are generated in any of the above cases. </ul> -</center> </section> <!-- FIX ME: tell more about indexing and ranges --> -- GitLab