>>However, this works:
>>
>>? ALEN(&longName)
>>
>>But this doesn't:
>>
>>? ALEN(EVALUATE(longName))
>>
>>From my point of view the real anomaly is that it accepts the array name within quotes at all. The help doesn't call for a character string value in ALEN(), just an ArrayName, which I take to be a VFP name expression. All my code using ALEN() supplies the array name as a name expression; it never occurred to me to try feeding it a string. I'd guess that ALEN() is interpreting 'm.oneArray' as a string literal, and there is no array in scope whose name is m.oneArray. However, I don't understand why the macro expansion works but EVALUATE() doesn't.
>
>Well it makes sense - macro expansion feeds the actual name into the line to be compiled and then executed, so you get your regular thing. Eval() of an array name gives you the value of the first element of an array - which is not the same as the name of the array (unless you cheat and put it there :).
I expected that the best the macro expansion could make of it was that it's "m.oneArray"--that is, a string literal. I expected it to fail.
This is the kind of stuff that drives me nuts. :-\
Ken Dibble
www.stic-cil.org