Larry,
LABEL LAgain
SET VAR vVarName TEXT
SET VAR vVarInt INT = NULL
CHOOSE vVarName FROM #GLOBAL
SET VAR vVarInt = (INT(.vVarName))
IF vVarInt IS NULL THEN
PAUSE 1 USING 'INVALID INTEGER VALUE CHOSEN' +
AT CENTER CENTER DEFAULT
GOTO LAgain
ENDIF
SET VAR vResult REAL = (&vVarName / 2)
Lawrence Lustig <[EMAIL PROTECTED]> wrote:
>> 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/
>
--
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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/