× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



James,

In hindsight, wouldn't fewer people get caught if the default was
eval(r)?

Barbara can correct me if I am wrong here, but IIRC the eval(r) and
*RESDECPOS options were not originally available in RPG ILE. So code
written prior to its introduction could potentially start behaving
differently just because you recompiled the program after the default
rules changed.

Unlike MS, in my experience IBM takes that very seriously and goes to
great lengths to maintain backward compatibility. To get new rules
you must change the source. Hence the option to add eval(r) on an
expression level basis, or *RESDECPOS at the header level.

There are times I think this is almost taken to a fault, but I would
rather they did that than start forgoing backward compatibility just
because they think the new rules make more sense. The classic example
to me is the old RPG II/III handling of the EOF indicator on the READ
opcode for a Demand file (not Full Procedural). Unlike virtually
every other opcode, it did NOT first reset the indicator prior to
performing the READ.

So you HAD to manually reset the EOF indicator prior to a READ when
using a demand file, or it could appear EOF occured when really it was
due to the indicator been set elsewhere in the program. Over the
years, I debugged numerous programs which boiled down to the original
programmer not realizing that was the case, and I have *never* seen a
program that relied on that fact in order to function correctly.

But IBM still didn't change the behavior with demand files, because
programs could start acting differently when recompiled. If they did,
chances are they would be acting right for the first time. :)

I was really glad when full procedural file READs started doing that
right. Of course, now I don't like resulting indicators at all. But
the point is that in general, for rules to change the source must
change.

Doug

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.