Anonymous user
User talk:Idrougge: Difference between revisions
m
→Loops/For: expanded the wording and explanation.
m (→adding other examples: added some comments concerning egoless programming.) |
m (→Loops/For: expanded the wording and explanation.) |
||
(One intermediate revision by the same user not shown) | |||
Line 200:
I just noticed that the text of the Rosetta Code task ''palindrome detection'' had changed (apparently, some time ago), so I deleted my 2<sup>nd</sup> REXX version and re-did version 1 to comply with the new task's requirements. Even after the wording in the task prologue and task requirements changed, it still seems a bit fuzzy and slightly contradictory (see the talk section). But, it was the author's first attempt at a Rosetta Code task, so there's that. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:45, 14 September 2015 (UTC)
== Loops/For ==
The Rosetta Code task requirement(s) '''Loops/For''' states:
Show how two loops may be nested within each other,
with the number of iterations performed by the
inner <big>'''for'''</big> loop being controlled by the
outer <big>'''for'''</big> loop.
(The highlighting was added by me. Note that both inner and outer loops are both '''FOR''' loops.)
This particular Rosetta Code task isn't about using the simplest '''DO''' loop, but to demonstrate how the outer '''DO''' loop with a '''FOR''' construct is to control the inner '''DO''' loop with a '''FOR''' construct. I do agree that the inner '''DO''' loop can be coded more simpler, (and indeed, it could've even been coded without a '''DO''' loop), but the task's requirements dictated/directed otherwise. I don't know if the task's author had in mind '''DO''' loops or '''FOR''' loops, but I interpreted the author's intent as a '''DO''' loop with a '''FOR''' keyword to control the number of iterations, which is the closest construct that REXX has to mimic a '''FOR''' statement that is used in other computer programming languages. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:49, 4 June 2020 (UTC)
|