LOOP: Limit number of iterations when IF clauses present.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 10 Nov 2019 18:29:17 +0000 (18:29 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 10 Nov 2019 18:54:28 +0000 (18:54 +0000)
commit65c0ae1b10b813ae602a29d16773ed30213cfaee
treea39dfd4cffb7e4c89c165871830a7a26064b3940
parent61a6dfff9145af1bef0fc4daa161410ee3fb6fe1
LOOP: Limit number of iterations when IF clauses present.

The LOOP command is limited by the MXLOOPS setting in some cirumstances.
Until now, if an IF clause was present, MXLOOPS was disregarded.
However, this behavior does not match SPSS behavior.  This commit makes
LOOP honor MXLOOPS even when IF is present, for compatibility.

With this commit, only the presence of an index clause makes LOOP
disregard MXLOOPS.

Thanks to Frans Houweling for reporting this bug.
doc/flow-control.texi
src/language/control/loop.c
tests/language/control/loop.at