[Oberon] FOR loop variable

Ala'a Mohammad amalawi at gmail.com
Tue Mar 14 21:33:29 CET 2023


Hi,

I'm a beginner in Oberon-2 who had recently picked it up (learning it
through practice). and really love the simplicity of the language.

I need help to understand the need to declare FOR loop stepping's variable.
(i.e x in FOR x := .....). I do not intend to change the language, but The
question arises since this variable always (in my short exposure to
Oberon-2) is scoped within the FOR loop body. And was trying to answer the
question:
Is it good design to have FOR implicitly declare its variable (It is not a
big issue to declare VARiables), or Is it from the point of uniformity to
have all variables declared with VAR?

forgive any ignorance on my part

Thanks for your time.

Ala'a

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20230315/acd0cb81/attachment.html>


More information about the Oberon mailing list