Use WHILE if step size is variable. Jörg
Am 09.12.2018 um 17:54 schrieb Dieter <d.gloetzel@web.de>:
On page 273 of "Programming in Oberon" Wirth and Reiser write:
FORStatement = "FOR" ident ":=" expression "TO" expression ["BY" ConstExpression "DO"] StatementSequence "END" And indeed when I try to put a variable as step size, the compiler doesn't like it.
This means I cannot write reusable code, which allows to be executed under different conditions with different step sizes.
I am sure, there is some reasoning behind this, but I find it kind-off inconvenient.
Regards, Dieter
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon