FUNCTION ArrayToCollection(laArray, lnMode) LOCAL lnX, lnCount, lcClass, loCol, laArray lnCount = ALEN(laArray) IF EMPTY(lnMode) lnMode = 0 ENDIF IF lnMode = 2 lcClass = "wwCollection" && avoid pulling into project ELSE lcClass = "Collection" ENDIF loCol = CREATEOBJECT(lcClass) FOR lnX = 1 TO lnCount loCol.Add(laArray(lnX)) ENDFOR RETURN loColThe compile error occurs at the point of the array usage (laArray(lnx)) and I can't recall how you can get the compiler to quiet down on this. The code actually compiles and runs fine - it's just a compiler 'warning' really, but its annoying.