Monthly Archives: October 2008

i've said it before and i'll say it again. arrays in vfp are not good. the cursor can do far more and sensibly too. simply modify structure. insert a new field between any two existing fields and the result is what you expect. not so with ains and two-dimensional (2d) arrays. this code demonstrates:

clear

?"using ains"

local array laarray[1]

prepareinitialarray(@laarray)

dimension laarray[3,3]

displayarray(@laarray)

ains(laarray,2,2)

displayarray(@laarray)

release all like laarray

*by this point the array does not look like it should.

wait window "now try ainsertcolumn"

clear

?"using ainsertcolumn"

local array laarray[1]

prepareinitialarray(@laarray)

ainsertcolumn(@laarray,2)

displayarray(@laarray)

return

procedure prepareinitialarray

lparameters raarray

?"initial… Continue reading