On Tue, Nov 12, 2019 at 11:52 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
You're assuming I would apply the technique only in cases where a SETLL was involved. But for consistency I code all read loops that way.
You're right that my comment about %EQUAL only works for SETLL, and
I'd like to withdraw that suggestion. I actually don't use that
myself, and I actually do prefer greater consistency among various
loops.
But I think there may be some misunderstanding about which technique
or approach we're even talking about. When you said "always prefer
this approach" what approach did you mean?
Are we talking about having the initial read outside the loop, then
testing EOF at the top of the loop, and having another read statement
at the bottom (inside) of the loop?
If so, my comment should be amended to: If you really consider EOF on
the initial read to be somehow different than EOF on subsequent reads,
then you should handle them differently. To be consistent (not
depending on SETLL), this would mean testing EOF separately (with IF)
before the start of the loop.
But you're entitled to your opinion and style just as I am.
Absolutely. I was just expressing the opinion that we (most likely)
prefer the same style when it comes to read loops, but we have
not-quite-compatible reasons for preferring it. Kind of like both of
us driving the same car, but you drive the car because you think it is
very fuel-efficient and you like the way it handles, while I drive the
car despite thinking that it's not that fuel efficient, because I like
the way it handles. (And I would recommend a different car for people
who prioritize fuel efficiency.)
John Y.
As an Amazon Associate we earn from qualifying purchases.