ncsa / qdl

the QDL programming language
Other
2 stars 0 forks source link

continue() inside an if[] does not afect outside scope #36

Closed jjg-123 closed 10 months ago

jjg-123 commented 11 months ago

Having a continue() call in a loop inside a conditional should continue the loop. The scope was ending at the conditional:

 key_set := {'a','b','c','d'};
      while[k∈key_set]
      do[
         if[k=='b'][continue();];
         if[k=='b']
         then[ok:=false;]
         else[i++;];
      ];

I.e. in this code, ok should be set false. Instead, i was incrementing.