[Oberon] FOR loop variable

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Fri Mar 17 11:07:41 CET 2023


> Some implementations might not necessarily protect the "fixed number of 
> times", for example if they don't assign the limit expression to a 
> temporary variable at the start of the loop. YMMV. Literally. :)

The mileage can even become infinite..

  j := 10;
  FOR i := 1 TO j DO
    IF j MOD 10 = 0 THEN INC(j, 10) END   (*mileage extension ;-)*)
  END

This is not possible in Oberon-2, but Oberon-07 allows it.


  



More information about the Oberon mailing list