Are STATIC arrays supported in XBasic?
I have zillions of static arrays all over the place! The easiest and best way to dimension and initialize them is like the following: FUNCTION Test () STATIC USHORT array[] IFZ array[] THEN GOSUB Initialize ‘ ‘ body of the function ‘ RETURN ‘ ‘ ***** Initialize ***** ‘ SUB Initialize DIM array[65535] FOR i = 0 TO 65535 array[i] = i NEXT i END SUB END FUNCTION This works correctly because XBasic arrays are always empty until they are DIMensioned. So IFZ array[] THEN is all it takes. The dimensions [and contents] of static arrays never change unless code in the function does it.