|
rpg400-l-bounces@xxxxxxxxxxxx wrote on 11/08/2006 09:55:45 AM:I have a need to check whether 20 indicators are on or off and I'd
like
tofind a way if possible to check them all without having to use
multiple
ifstatements.
Michael Shutte wrote on 08/11/2006 12:51:07 PM:
for ix = 1 to 20; if *In(iX) = *On; // do something endif; endfor;
Or, if you don't want to do the 'something' 20 times if all indicators are on: fld1 = *allx'0'; fld1 = *in(FIRST_INDICATOR); fld2 = *allx'0' if (%bitor(fld1:fld2) <> fld2); endif; where fld1 and fld2 are 3 byte fields. I'm not totally sure if the first statement would work - can someone else suggest a method for assigning 20 bytes starting at *inXX to a field? Also, the syntax for the *ALLX'0' might not be exactly right - I hope you get the general idea though ... HTH, Adam ##################################################################################### Attention: The above message and/or attachment(s) is private and confidential and is intended only for the people for which it is addressed. If you are not named in the address fields, ignore the contents and delete all the material. Thank you. Have a nice day. For more information on email virus scanning, security and content management, please contact administrator@xxxxxxxxxxxx #####################################################################################
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.