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



"Weber, Richard" wrote:
> 
> Changing indicator would be by eval to the string '0010000000000000000'.
> Checking for tie function key on is through a different DS written over the
> INFDS.  It was stated that the gain is that all these indicators can be set
> at the same time.
> 

Is the idea behind this to make the code shorter or to make it faster?  

If faster, it's not worth the maintenance problems that kind of coding
can cause.  The time required to even set the indicators individually
would be nothing compared to the time required to do the display file
operation.

If shorter, presumably to make it easier to maintain?, I don't see the
advantage of this:
   dspfInds.functionKey = '0010100000000000100000000';
over this:
   clear dspfInds.functionKey;
   dspfInds.exit = *on;
   dspfInds.refresh = *on;
   dspfInds.checkEmail = *on;
Even this would be somewhat better, since you'd still know which ones
were being set on without counting:
   clear dspfInds.functionKey;
   dspfInds.in03 = *on;
   dspfInds.in05 = *on;
   dspfInds.in14 = *on;
or this, defining it as an array:
   clear dspfInds.functionKey;
   dspfInds.functionKey(03) = *on;
   dspfInds.functionKey(05) = *on;
   dspfInds.functionKey(14) = *on;

By the way, your suggested method has an bonus opportunity for error. 
If you code fewer than 24 bytes in your literal (as your example above
has :-), you'll put blanks in the final indicators, which is probably
not what is actually intended.


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.