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



From: Barbara Morris

W@GOOD = *blank;
i = 1;
dow W@GOOD = *blank;
   K@FAC = candidate(i);
   exsr $100;
   i = i + 1;
enddo;
if W@GOOD = *blank;
   W@GOOD = 'NO';
endif;

Barbara, if none of the entries pass the $100 test, then won't this code get
an array index error?

Anyway, I'd definitely subprocedure this.  The following would be one
choice, and an array would be the other.
 
SELECT;
  When CheckFac( 30);
    K@FAC = 30;
  When CheckFac( 10);
    K@FAC = 10;
  When CheckFac( 20);
    K@FAC = 20;
  Other;
    W@GOOD = 'NO';
ENDSL;

But HERE'S a fun one.  Change W@GOOD to Boolean, and then do this:

W@GOOD = (CheckFac(30) OR CheckFac(10) OR CheckFac(20));

CheckFac procedure:

If (code to check facility is true);
   K@FAC = facility;
   Return *ON;
Endif;
Return *OFF;





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.