5 pts.
 RPG Array
Hello ! Can I check for all the elements of an Array in single statement ? e.g. If Array(*All) = *Blanks ? I want to check that all elements of an array is blank or not.

Software/Hardware used:
ASKED: November 24, 2008  9:47 AM
UPDATED: November 24, 2008  6:30 PM

Answer Wiki:
Hi, Doesn't the following work ? If Array = *Blanks Regards, Martin Gilbert.
Last Wiki Answer Submitted:  November 24, 2008  11:36 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I don’t think ‘If Array = *blanks’ will work – the compiler is expecting an index to be referenced.

This may be a pain, but I’ve found that if I create a data structure where the array overlays a field, then I can check that field for blanks.

For instance, if my array is defined like this:

d ds
d aDS 10
d aArray 2 dim(5) inz overlay(aDS)

The array (aArray) overlays field aDS. Field aDS is the same size as the entire array. I can then use field aDS to check for blanks.

 40 pts.