Date: Fri, 24 Jun 2005 13:57:54 -0700
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: MAX of _TEMPORARY_ array?
Content-Type: text/plain; charset="us-ascii"
So why not just skip/ignore the array & do
maxa = max(of a1 - a&dima.) ;
?
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Talbot Michael Katz
Sent: Friday, June 24, 2005 1:30 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: MAX of _TEMPORARY_ array?
Hi, Mark.
Thank you for responding. Sorry, this is not what I am looking for at
all. I want the largest value contained in the array. For example:
data _null_;
array a{*} a1-a3;
do i = 1 to 3;
a{i} = (4*i) - (i*i);
end;
maxa = max(of a{*});
put maxa= ;
run;
This will output:
maxa=4
because the values of a{} are a{1} = 3, a{2} = 4, a{3} = 3, and 4 is the
biggest one.
But now try doing this with the array declared as _temporary_, e.g.,
array a{3} _temporary_ ;
and the max function gives an error.
-- TMK --
"The Macro Klutz"
|