|
On 10/2/06, minze su <slhappyls@gmail.com> wrote:
>
> I would say sas is not good
>
Before condemning SAS as not good, understand that this is the macro
environment we are talking about here. Macros are primarily meant for text
substitution, and the control structures available in that environment are
not meant to be a complete numerical programming environment. The macro
facility is designed to offer flexible ways of turning a lanuage of symbols
into SAS statements. That's why you often hear of "macro expansion",
because macros expand a small set of symbols into a larger set. The fact
that you must use integral increments in the %do loop construct is due as
Toby said to the fact that this statement involves an implicit call to %eval
and not %sysevalf.
But there are still options to accomplish what you need to do.
Here are 3 options, there are certainly other ways too.
1) You can try the method Toby suggested which provides access to a sequence
of arbitrary values.
2) Find a way to do this in a data step where "do i=0 to 1 by 0.1" is
perfectly valid.
3) Find the least common denominator of all possible iterations you are
interested in, set that to 1, and rescale accordingly.
Best of luck!
|