From 628ab44caeae14a2099dbd57341719f47d62a6bd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 7 Feb 2005 05:49:44 +0000 Subject: [PATCH] Clarify LOOP. --- doc/flow-control.texi | 6 ++++++ 1 file changed, 6 insertions(+) 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}). -- 2.30.2