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




The proposal was to code a data structure for the screen indicators using
the "N" data type and to use variable names that are meaningful.  The
technique that I am asking for opinions on is that the group of indicators
can be set or tested by using a string such as: '0010000000100000000".

Don't use a string like that to set indicators. Ever. No matter what they're for. Set each one individually.

Make it clear in your code what you're doing.  Doing something like this:

  Clear_Subfile = *OFF

is self documenting. You know that this code turns off an indicator, and you further know that the indicator controls whether a subfile is cleared. It's easy to follow. On the other hand, what does the following code do?

Dsp_Inds = '000000000000000000000000000000000000000000000000000000010000'

It's not obvious, is it? If you take the time to count them, you can see that it sets 60 different indicators. If you count very carefully, you can tell that it's the 56th indicator that's turned on, and the others are all turned off... but even the process of counting THAT is both error prone and time consuming.

It's certainly not obvious what the code does, or why you're setting that one on and turning the others off. The simplicity and elegance of simply coding

  Highlight_Error = *ON

would be sooooo much more clear.

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.