FoxPro have the operator & ("macro substitution"), which is very powerful. How can I obtain the same functionality in VB?
FoxPro example:
STORE "3+4" TO varX
varY = &varX
(in that way, varY will contain 7)
VB example:
????
Thanks in advance.
Printable View
FoxPro have the operator & ("macro substitution"), which is very powerful. How can I obtain the same functionality in VB?
FoxPro example:
STORE "3+4" TO varX
varY = &varX
(in that way, varY will contain 7)
VB example:
????
Thanks in advance.
Hi
VarX = 3 * 4
Vary = VarX
Another method:
Z = 3
W = 4
VarX = Z * W
Vary = VarX
Lyla,
I don't think that is what JMuller is asking.
The expression is in string format...how can it be un-string?
VarX = "3*4"
Vary=VarX --- still is a string JMuller wants it to be the value of 3*4 ie 12.
FireBeast.
PS Macro substitution is very usefull, but I don't think you can do it it VB
Let me explain the problem in another way. Supose this code in FoxPro:
varX = 5
varA = "IIf(varX=1, 2, 4)"
? 10 + &varA && Shows 14
varA = "IIf(varX>5, 3, IIf(varX=5, 8, 7))"
? 10 + &varA && Shows 18
The problem is: how can I change the condition on the addition, without change the addition itself?
Thanks again...