Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: ALEN ArrayName expression don't support dot prefix
Message
From
18/07/2005 20:37:12
Ken Dibble
Southern Tier Independence Center
Binghamton, New York, United States
 
 
To
18/07/2005 10:09:03
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01033297
Message ID:
01033695
Views:
13
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform