On 29/06/2022 8:48 pm, Paul Gilmartin wrote:
On Jun 29, 2022, at 06:37:39, Lionel B. Dyck <lbd...@gmail.com> wrote:
Some align the end with the do, others align the end with the code in the do
structure. The key is a consistent style for readability.
The REXXFORM results of my example are:
/* rexx */
x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
say out.i
end
For any large loop, I cite the control variable on the "end" to eliminate
confusion:
x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
say out.i
end I
That doesn't eliminate confusion at all. If you have a large loop and
you don't understand your code then your code is crap. Any decent code
editor will match blocks on key-press. ISPF doesn't meet that criteria!
At times I use an otherwise otiose control variable:
do ThisLoop = 1 until1
...
end ThisLoop
(I wish JCL would require that the name fields on IF, ELSE, and THEN match.)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN