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 (June 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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?
Comments: To: Talbot Michael Katz <topkatz@MSN.COM>
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:


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"

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