Q:
My goal is to create a function to clear column data (‘old value’ and ‘new value’) from any array based on array name.
A:
you could pass the array name and macro substitute it where necessary.
Code:
public arr1(5,3) arr1(1,1) = 'txtName' arr1(1,2) = 'test' arr1(1,3) = 'testing' ? arr1 proc myproc para myarray &myarray(1,2) = .f. &myarray(1,3) = .f. ? arr1 endproc do myproc with "arr1"
Q:
what does the ‘&’ sign just before the (field(i)) do? (? &(field(i)))
A:
The “&” character indicates a macro substitution:
http://www.lianja.com/doc/index.php/%26