From: Ben Pfaff Date: Mon, 7 Feb 2005 05:49:44 +0000 (+0000) Subject: Clarify LOOP. X-Git-Tag: sav-api~2420 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=628ab44caeae14a2099dbd57341719f47d62a6bd;p=pspp Clarify LOOP. --- diff --git a/doc/flow-control.texi b/doc/flow-control.texi index 2145033180..f1fe00e7a9 100644 --- a/doc/flow-control.texi +++ b/doc/flow-control.texi @@ -158,6 +158,12 @@ loop is executed MXLOOPS (@pxref{SET}) times. @cmd{BREAK} also terminates @cmd{LOOP} execution (@pxref{BREAK}). +Loop index variables are by default reset to system-missing from one +case to another, not left, unless a scratch variable is used as index. +When loops are nested, this is usually undesired behavior, which can +be corrected with @cmd{LEAVE} (@pxref{LEAVE}) or by using a scratch +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}).