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



This is just idle curiosity ... I was chatting with a friend the other
day and was trying to figure out if there was any modern RPG mechanisms
that still required indicators (*INnn type).

'Required' is a bullet in the chamber of the gun called 'modern.' Caveat lector...

Last week I wrote a cycle data conversion program that used indicators on TESTN. No, it wasn't strictly required; I could have done something with a subprocedure and a boolean return value, but TESTN does exactly what I needed (a sanity check that I had the proper structure definition.) I could have rolled my own cycle, too. I could have written a bunch of SQL user defined functions in RPG and done the conversion in SQL if I wanted. Choices, choices.

In the end, I took the path that was easiest for me to write. If another programmer needs to maintain this one-timer (they never really are just one-timers, are they?) then I'm not at all sorry that he might have to read up on

* report fields that should be numbers but aren't
* note that empty (blank) fields are OK
   TESTN charfld 2020
n20 EXCEPT badCharfld

In the end, my comfort with indicators in this context outweighed the distaste for global variables.

  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.