X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fflow-control.texi;h=6c7a88ded186371c5cd0381f5c9d379a989fe3c2;hb=affe7a183d52208ffba24f2bc303ba8ccb2394a8;hp=fe81c94357c42a1b5b1bd1c6c4927a0dffba6424;hpb=e2da62d735c597afeef2e0e9b36e5a4a83d7da94;p=pspp diff --git a/doc/flow-control.texi b/doc/flow-control.texi index fe81c94357..6c7a88ded1 100644 --- a/doc/flow-control.texi +++ b/doc/flow-control.texi @@ -1,3 +1,12 @@ +@c PSPP - a program for statistical analysis. +@c Copyright (C) 2017 Free Software Foundation, Inc. +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.3 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +@c A copy of the license is included in the section entitled "GNU +@c Free Documentation License". +@c @node Conditionals and Looping @chapter Conditional and Looping Constructs @@ -120,9 +129,9 @@ Any command may appear within @subcmd{DO REPEAT}, including nested @subcmd{DO RE commands. If @cmd{INCLUDE} or @cmd{INSERT} appears within @subcmd{DO REPEAT}, the substitutions do not apply to the included file. -If @subcmd{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{+}). +If @subcmd{PRINT} is specified on @cmd{END REPEAT}, the commands after +substitutions are made should be printed to the listing file, prefixed +by a plus sign (@samp{+}). This feature is not yet implemented. @node LOOP @section LOOP @@ -140,11 +149,11 @@ termination options are offered. Specify index_var to make that variable count from one value to another by a particular increment. @var{index_var} must be a pre-existing numeric variable. @var{start}, @var{end}, and @var{incr} are numeric expressions -(@pxref{Expressions}.) +(@pxref{Expressions}.) During the first iteration, @var{index_var} is set to the value of @var{start}. During each successive iteration, @var{index_var} is increased by the value of -@var{incr}. If @var{end} > @var{start}, then the loop terminates +@var{incr}. If @var{end} > @var{start}, then the loop terminates when @var{index_var} > @var{end}; otherwise it terminates when @var{index_var} < @var{end}. If @var{incr} is not specified then it defaults to +1 or -1 as appropriate. @@ -173,8 +182,10 @@ code block is executed. The condition is evaluated at the end of the 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 neither the index clause nor either condition clause is -present, then the loop is executed @var{max_loops} (@pxref{SET}) times. +If the index clause is not +present, then the loop is executed at most @var{max_loops} (@pxref{SET}) times +(but possibly fewer, if a condition clause evaluates to false or if +@cmd{BREAK} executes). The default value of @var{max_loops} is 40. @cmd{BREAK} also terminates @cmd{LOOP} execution (@pxref{BREAK}).