> When I use
> IF ASCAN(aArray2,myfield)
> instead of
> FOR i = 1 TO ALEN(aArray2,1)
> IF myfield = aArray2(i,1)
> I get a Data Type mismatch error. I know that my array contains different
> data types, since it comes from AFIELDS() but the help for the ASCAN
> function implies that it shouldn't matter. Am I missing something?
ASCAN() returns a numeric value, indicating the 'cell' in the array that
contains the right value. You're checking it as if it returns a
logical. Your code should read:
IF ASCAN(aArray2,myfield) # 0
/Paul