Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution
Message
From
08/04/1998 13:15:24
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Macro substitution
Miscellaneous
Thread ID:
00090513
Message ID:
00090513
Views:
75
Hi:

The help file shows the following for the & command:

& Command
Performs macro substitution.

Syntax
& VarName[.cExpression]

Arguments
& VarName Specifies the name of the variable or array element
to reference in the macro substitution.

.cExpression The optional period (.) delimiter and .cExpression
are used to append additional characters to a macro.
cExpression appended to the macro with .cExpression
can also be a macro.

Given that explanation one of the following should work:

var_value = 5
var_name = 'var_value'

output_var = &var.'_name'
.OR.
output_var = &var._name
.OR.
cEXPR = '_name'
output_var = &var.eEXPR
.OR.
cEXPR = '_name'
output_var = &var.&eEXPR
.OR.
cEXPR = '_name'
output_var = &var.(eEXPR)
All of those are supposed to append "_name" to &var thus making &var_name.
Needless to say, none of them work.

The only usage I've found is:
var_value = 5
var_name = 'var_value'
output_var = &varname
This is a very limited usage since it's too "strict"

Does anybody know the right way to do this?

TIA
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico

Still waiting for FoxPro for LINUX
Next
Reply
Map
View

Click here to load this message in the networking platform