Question: arrays

Two questions, please excuse the sloppy explanations - FIRST: If I do the followig: myArray := array(1 .. 5): myArray[1] := 4 myArray[3] := 5 How do I find out which elements in the array are empty? I can't seem to get something like IsZero to work for this even if I load ArrayTools and use Array instead. For example something like: for i from 1 to 5 do if myArray[3] is !empty then print(myArray[i: end if od SECOND: Is there a way to dynamically resize an array? For example, to make something like the following work, starting with an array with a single element: myIndex:=0 for i to 20 do if whatever is true then increase anArray size and do anArray[myIndex]:=whatever: myIndex = mIndex+1: fi: od od with a final result of anArray being a size of 5 elements if "whatever is true" was true 5 times.
Please Wait...