08-Mar-2026
Last Friday, I was doing an update to an existing command procedure. I needed to make a continuous check for values comparing it with a reference value.
I knew aboug that maximum depth for the IF-THEN clause. What I didn't know is that it includes any subsequent IF-THEN clauses within an enclosing IF-THEN clause.
Anyway, when I tested the program, I saw the error, UNDEFINED IF-THEN% something-something, and I checked where I have done the change.
I caught it. It was the long IF-THEN clauses, but this time, there is already the IF-THEN clause at the top level. How did I got it fixed?
Good thing there is GOSUB.
I found a nice location where it won't affect the rest of the loops and all, et voila!
So, there you have it.
Maximum IF-THEN levels is still 15, and it applies to the enclosing IF-THEN clause down to subsequent IF-THEN clauses. Use GOSUB, or any other applicable lexicals to effect the logic you need.
Till then!
No comments:
Post a Comment