LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 30 Aug 2009 21:31:24 -0500
Reply-To:     OR Stats <stats112@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         OR Stats <stats112@GMAIL.COM>
Subject:      Re: Error in intrepretting sqrt's & exp's
Comments: To: Jack Hamilton <jfh@stanfordalumni.org>
In-Reply-To:  <EDFF7826-560E-4CB3-A3BD-135CC6BC337C@alumni.stanford.org>
Content-Type: text/plain; charset=ISO-8859-1

terrific! thx much

On Sun, Aug 30, 2009 at 9:23 PM, Jack Hamilton <jfh@alumni.stanford.org>wrote:

> SYSEVALF takes an expression as its first argument, but not an expression > that contains functions. I don't quickly see that made explicit in the > documentation, but it's probably in there somewhere. In this context, > expressions consist of numbers and operators. > > You can use the %SYSFUNC macro function inside the %SYSEVALF function to do > what you want: > > ===== > 1 %let b=%SYSEVALF(%sysfunc(SQRT(2*%sysfunc(EXP(-.5))-1))); > 2 %put &B.; > 0.46158565773349 > ===== > > -- > Jack Hamilton > jfh@alumni.stanford.org > Tots units fem força! > > > > > > On Aug 30, 2009, at 7:10 pm, OR Stats wrote: > > Hello: >> >> I am getting an error when I try to evaluate the following function in SAS >> and setting it as a macro variable: >> >> >> %let b=%SYSEVALF(SQRT(2*EXP(-.5)-1)); >> >> A character operand was found in the %EVAL function or %IF condition where >> a >> numeric operand is required. The condition >> >> was: SQRT(2*EXP(-.5)-1) >> > >


Back to: Top of message | Previous page | Main SAS-L page