General information
Category:
Coding, syntax & commands
>I'm trying to create an array on the fly and expand the number of columns as I add rows that have ever increasing number
>of columns not to exceed the max number of columns in any given row. The default behavior is to shuffle the elements up
>the list when a dime is issued on the array. In other words, I want myarray[row1,column3] to stay row1,column3 even if I say
>dime myarray[1,4]. This way I can have an array that is only the exact size needed to hold the info. and will never be too small.
I wrote this in Fox 2.6, but I don't think the version should matter
FUNCTION ADDCOL
PARA pArray
PRIVATE ALL
nRows = ALEN(pArray,1)
nCols = ALEN(pArray,2)
DIME pArray[nRows * (nCols+1)]
FOR I = 1 to nRows - 1
=AINS(pArray,I + I*nCols)
ENDFOR
DIME pArray[nRows,nCols+1]
The result is an added column with values of .F.
I think that is what you needed
.............Rich
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only