>The solution I use is
>
>* get files
>n=ADIR(a,"*.prg")
>* allocate space a new column
>DIMENSION a[n,6]
>* insert new column on the end
>=AINS(a,6,2)
>
>
>The result will be an array with six columns with the last column being .F., and ready for data. The trick is the AINS().
The last column will be .f., but the rest of the elements won't move correctly. You'd expect that the old 6th element (the 1st element of the 2nd row before redimensioning) would now be the 7th element, but no - it's now .f., and the a(2,1) doesn't contain a filename, it contains a length. Check in the debugger. When you do ains() without the third parameter, all the elements below the starting position shift nCol positions down, so if you do aIns(a,4), you get a(4,1) to a(4,5) as .f., a(5,1) contains what was in a(4,1) etc. Doesn't work when inserting a column.