Don't override label for Save As menuitem
[pspp-builds.git] / doc / flow-control.texi
index ea9f5a570c951b35e6126c04cb27899a40588fe7..868143b35a5a0ba8b73c5f628834f9b7a39cc87a 100644 (file)
@@ -1,4 +1,4 @@
-@node Conditionals and Looping, Statistics, Data Selection, Top
+@node Conditionals and Looping
 @chapter Conditional and Looping Constructs
 @cindex conditionals
 @cindex loops
@@ -15,7 +15,7 @@ looping, and flow of control.
 * LOOP::                        Repeat a block of code.
 @end menu
 
-@node BREAK, DO IF, Conditionals and Looping, Conditionals and Looping
+@node BREAK
 @section BREAK
 @vindex BREAK
 
@@ -29,7 +29,7 @@ BREAK.
 @cmd{BREAK} is allowed only inside @cmd{LOOP}@dots{}@cmd{END LOOP}.
 @xref{LOOP}, for more details.
 
-@node DO IF, DO REPEAT, BREAK, Conditionals and Looping
+@node DO IF
 @section DO IF
 @vindex DO IF
 
@@ -59,7 +59,7 @@ When @cmd{DO IF} or @cmd{ELSE IF} is specified following @cmd{TEMPORARY}
 (@pxref{TEMPORARY}), the @cmd{LAG} function may not be used
 (@pxref{LAG}).
 
-@node DO REPEAT, LOOP, DO IF, Conditionals and Looping
+@node DO REPEAT
 @section DO REPEAT
 @vindex DO REPEAT
 
@@ -109,7 +109,7 @@ If PRINT is specified on @cmd{END REPEAT}, the commands after substitutions
 are made are printed to the listing file, prefixed by a plus sign
 (@samp{+}).
 
-@node LOOP,  , DO REPEAT, Conditionals and Looping
+@node LOOP
 @section LOOP
 @vindex LOOP
 
@@ -145,16 +145,19 @@ cause the loop to be executed only if the condition is true.  If the
 condition is false or missing before the loop contents are executed the
 first time, the loop contents are not executed at all.
 
-If index and condition clauses are both present on @cmd{LOOP}, the index
-clause is always evaluated first.
+If index and condition clauses are both present on @cmd{LOOP}, the
+index variable is always set before the condition is evaluated.  Thus,
+a condition that makes use of the index variable will always see the
+index value to be used in the next execution of the body.
 
 Specify a boolean expression for the condition on @cmd{END LOOP} to cause
-the loop to terminate if the condition is not true after the enclosed
+the loop to terminate if the condition is true after the enclosed
 code block is executed.  The condition is evaluated at the end of the
-loop, not at the beginning.
+loop, not at the beginning, so that the body of a loop with only a
+condition on @cmd{END LOOP} will always execute at least once.
 
-If the index clause and both condition clauses are not present, then the
-loop is executed MXLOOPS (@pxref{SET}) times.
+If neither the index clause nor either condition clause is
+present, then the loop is executed MXLOOPS (@pxref{SET}) times.
 
 @cmd{BREAK} also terminates @cmd{LOOP} execution (@pxref{BREAK}).
 
@@ -167,4 +170,3 @@ variable as the loop index.
 When @cmd{LOOP} or @cmd{END LOOP} is specified following @cmd{TEMPORARY}
 (@pxref{TEMPORARY}), the @cmd{LAG} function may not be used
 (@pxref{LAG}).
-@setfilename ignored