Hi
Have you tried embedding a period in front of the variable.
I don't know if this still works, used to...
CHOOSE vVarName FROM #GLOBAL
set v vVarName = ('.' + .vVarName)
SET VAR vResult REAL = (.vVarName / 2)
Ben Johansen - http://www.pcforge.com
Authorized WiTango Reseller
http://www.pcforge.com/WiTangoGoodies.htm
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Lawrence Lustig
Sent: Tuesday, January 29, 2002 9:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Using macro substitution after left paren in expression
> SET VAR vMyVar = 24
> SET VAR vVarName text = (ctxt(.vMyVar))
> SET VAR vResult real = (int(.vVarName) / 2)
> It gives the correct result.
> Jim Blackburn
Thanks Jim. Unfortunately, it simply moves my problem
one statement up in the program. The real problem is
that I can't write .vMyVar in any expression since I
won't know which variable to operate on until runtime.
It's frustrating to not be able to express myself
clearly. Perhaps this is a little better example of
my problem:
CHOOSE vVarName FROM #GLOBAL
SET VAR vResult REAL = (&vVarName / 2)
Here the user chooses a variable and I want to divide
it by two.
--
Larry
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/