X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fflow-control.texi;h=a8e399f0f489c1a056a6f19fb107ad774f0161ae;hb=29ff1e6f7b8220c0800740e525381053ca53d2d4;hp=04fd6c3c8fba4a1837c98deaeaac03078da766a4;hpb=5dbf5abcbed01f04422d4dead1c0ae0bb7efde4f;p=pspp diff --git a/doc/flow-control.texi b/doc/flow-control.texi index 04fd6c3c8f..a8e399f0f4 100644 --- a/doc/flow-control.texi +++ b/doc/flow-control.texi @@ -149,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. @@ -182,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}).