>>AAdd( aKeys, IDALTF.ELREF )
>>
>>Remember, I'd like to leave these calls unchanged...
>>
>>TIA
>>
>>Larry
>
>It shouldn't be too hard, as long as you aren't trying to implement sparse arrays. ALEN() can be used to determine the current size of the array (get the # rows, # cols), use DIMENSION to redimension the array to add a row (this will create a row filled with logical .F. as the last row of the array, and then for each column in the array, replace the equivalent column of the last row with the parameter corresponding to the position. The arrray must be passed by reference explicitly. A brain-dead simpl example:
>
>
>FUNCTION AddAnArrayRow
>lparameter taarray, tuarg1, tuarg2, tuarg3, tuarg4
>local ncol, nrow
>ncol = ALEN(taarray,2)
>nrow = alen(taarray,1)
>dimension taarray[nrow+1, ncol]
>local nCtr
>FOR nCtr = MIN(ncol,4)
> taarray[nrow+1,nCtr] = EVAL('tuarg'+str(cNtr,1))
>ENDFOR
>RETURN .t.
>
>DIMENSION myArray[1,2]
>MyArray[1,1] = 'First'
>MyArray[1,2] = 'Second'
>=AddAnArrayRow(@MyArray,3,'Four')
>=AddAnArrayRow(@MyArray,'Five',6.000)
That's what I was afraid of... guess I'll have to visit each call to Aadd() and add the @ sign, etc...
shucks
Thanks though...