Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution, name expression
Message
 
To
24/05/2001 21:05:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00511274
Message ID:
00513698
Views:
12
E. C.,

One way to think about these two operations is to adjust the names you are using. Refer to the &Varname expansion as Macro EXPANSION. That is the operation takes the content of a varaible and expands it as if the content was the code on the line where the &var appears.

The other operation is referred to as Name EXPRESSIONS and it is used where ever VFP is expecting the name of something (ie a file, a field, etc..). The surrounding of the variable with parens allows you to use an expression instead of the actual name in your code.

A third operation that fits in here is the EVALUATE() function, which returns the value of an expression by evaluating the expression. For example;
lcVar = "1 + 2"
?Evaluate(lcVar) && returns 3
I hope this is usefull.
Previous
Reply
Map
View

Click here to load this message in the networking platform