|
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
As an Amazon Associate we earn from qualifying purchases.
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.