Please enable JavaScript to view this site.

 

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(30001)
while nRunningDate <= nNextMillenium
   // do something …
endwhile

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