Default value: 400
Allowed range: 25 to 2000
The purpose of this compiler directive is to avoid an accidental infinite loop while processing a macro.
Consider the following code :
nRunningDate = Today()
nNextMillenium = FirstDateOfMonth(3000, 1)
while nRunningDate <= nNextMillenium
// do something …
If you forget to increase the value of nRunningDate inside the while loop, you will get an infinite loop. To protect you against this, every time you enter into a for or while loop, the macro evaluator keeps track of the number of times you have looped.
If that number exceeds the value of MAX_NUM_ITERATIONS, then an error message will be generated, detailing the value of the loop counter, and the assembler line where it occurred, and aborting the script.
Topic 107016, last updated on 18-Apr-2020