I don’t have time to track down the other posts right now, but this is the way it is designed to work. Formulas, including a simple field or variable, are considered true false values. Zero is false, everything else is true. Since NumParts has a value of 2, it is true, and the condition for ending the loop has been met.
This is not the way Panorama 6 worked, but Jim considers that to be a bug in Pan 6, and contrary to its documentation.
Hello Everybody,
I just read Michael’s question, and Dave/Jim’s response.
I have (in Pan 6) many Loop structures which end in an “until myvariable”, because I don’t know how many loops are needed until something else has first been calculated. How will this be handled in Pan X? The “for …” structure is new to me. Can that be used for an initially unknown variable?
I would certainly use the for structure if coding from scratch but my current task is importing Panorama 6 files with very large procedures. I’ll just have to locate and fix them.
The simplest fix for me is to replace until variable with until L > variable - but of course that only works where there is a counter, L.
Could I suggest that an example of this be added to the Help documentation on Loop statements? It is such a common thing to want to do (for me), and such a change from Panorama 6…