I have done some more testing, and these changes give the same results as my suggestion. I tested the cases "{" & "}" which led to the surprising (to me) observation that line feeds are allowed within SETs. I am not saying this is a problem.Ivan Denisov wrote:Please, take a look at the changes...
It was not obvious to me, looking at the source code, that your changes were equivalent. I assume that you have thought it through.
Ok. Personally I think the LOOP is shorter, simpler, and more efficient than all the additional ELSE logic. I guess that computer scientists don't like LOOPs because they don't fit formal Proof-of-correctness reasoning. The way I think about certain classes of problem is more closely aligned to LOOPs with multiple EXITs, so for me this is a more natural construct for these problems. But we don't need to discuss this here.Ivan Denisov wrote:I changed the LOOP statement to WHILE...
Regards
Robert