× 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.



No...while I use booleans (as I would in any language), the only indicators
I use are for working with display and printer files, and *INLR. I can't
imagine using the cycle. While I know people still use level indicators, and
god love 'em, I just don't use them. If I only wrote in RPG, then maybe I
would use level indicators. But I don't have to change my level break logic
when I'm working with different languages cause I do level breaks the same
way.

On 12/8/06, James H H Lampert <jamesl@xxxxxxxxxxx> wrote:

David Gibbs <david@xxxxxxxxxxxx> wrote:

> Well, I did say _modern_ RPG.

FOR PITY'S SAKE! The primary elements of RPG that
distinguish it from all other languages are (1) its source
format, and (2) The Cycle.

You get rid of those, and why in blazes should you still
call it RPG?

At any rate, whenever practical, I use %FOUND(<filename>)
rather than an indicator to determine whether a CHAIN was
successful. But occasionally, I run into problems (as with
my earlier project involving reading an
externally-described file into a data structure) in which
the "ER" condition is equivalent to the "NF" condition,
and the simplest way to keep the program from locking up
is to stick an indicator in the appropriate column for the
ER and NF conditions, and use it instead of %FOUND.
Likewise, it is not inconceivable that even
%FOUND(<filename>) might get polluted by the time I
actually need to know whether a record was found, and
sticking an indicator in NF is more convenient than
defining a variable to hold the %FOUND result.

Then, too, IF/ENDIF statements are considerably more
verbose than conditioning a statement on an indicator, and
the latter option may in some cases simplify the nesting,
making it easier to see what is inside of what.

And of course, you may want to take some action depending
on whether an arithmetic operation produced a positive,
negative, or zero result; indicators save you from having
to do comparisons on the result.

--
JHHL
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.