Larry: Would this not work?
SET VAR vMyVar = 24 SET VAR vVarName = .vMyVar SET VAR vResult = (.vVarName / 2) Or maybe I'm missing something. Mike -----Original Message----- From: Lawrence Lustig [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 11:03 AM To: [EMAIL PROTECTED] Subject: Using macro substitution after left paren in expression Does anyone know a work around to get the following code to execute (this is a simplified version of what I'm trying to do): SET VAR vMyVar = 24 SET VAR vVarName = 'vMyVar' SET VAR vResult = (&vVarName / 2) The result should be that R:Base substitutes vMyVar for &vVarName and produces 12. as the result. However, R:Base interprets the & as a concatenation operator and reports that it cannot be used in this location in the expression. (ERROR 2145 -- A left parentheses cannot be followed by binary operator). What I'm looking for is some operator or expression I can put in front of the & to force the expression to evaluate correctly. (I have one work around, which is to do this: SET VAR vExpression = '(vMyvar / 2)' SET VAR vResult = &vMyExpression) but in my real situation, as opposed to this simplified version, it causes the code to become very difficult to read) -- 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/
