Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
At 08:42 AM 12/9/2006, Jon Paris wrote:
No. There is nothing in the language that requires numbered indicators. I would also make the point that code such as If *IN03 = '1' has never been needed in RPG IV. A much better approach is to use a named constant with the appropriate value. E.g. If *IN(ExitRequest
I like to use indicator variables for these types of questions too. I agree than *IN03 = '1' doesn't make much sense either.
Instead of "If *IN(ExitRequest)" I would probably use something like "If ExitRequested", or "If ExitRequest" in your example. When reading the code, I don't care that ExitRequested is an indicator variable. It just seems to read better that way for me. I try to make all my indicator variables naturally readable if possible. A little extra typing up front makes is easier for the next person (which may be me!) figure out what is happening in the code.
I also use True/False to assign values to indicator variables instead of *ON/*OFF. Again, seems to be more readable to me.
When I use the INDDS (which nowadays is almost always) I do sometimes use F3Exit, so I would code "If F3Exit", but you could also code it "If ExitRequested".
Dave Murvin DRM Enterprises, Inc.
This mailing list archive is Copyright 1997-2026 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.