Date: Wed, 23 Dec 1998 16:23:46 -0500
Reply-To: "Ward, David" <DWard@DAS-INTERNATIONAL.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Ward, David" <DWard@DAS-INTERNATIONAL.NET>
Subject: Evaluating numeric expression in a string
Here's a little challenge that I faced recently ...
Suppose you have a string with a numeric expression in it, i.e.
or anything else.
Now Suppose you need to CALCULATE the result. The only method I could come
up with was to concatenate a %sysevalf() around the expression and use the
resolve function to grab the answer, but it seemed a bit slow.
answer = resolve ('%sysevalf('||string||')');
Does anyone have a better solution that would be more direct and perhaps
INNOVEX DAS, Inc.
501 Hoes Ln, Suite 300
Piscataway, NJ 08854