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 (May 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 7 May 2009 14:44:32 -0700
Reply-To:   Francogrex <franco@GREX.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Francogrex <franco@GREX.ORG>
Organization:   http://groups.google.com
Subject:   Array sorting
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

Why this below is giving an error and how to fix it. thanks.

data sortme; array Arr(8) (47 14 51 12 75 4 5 5); do j=2 to dim(Arr); key = Arr(j); i = j - 1; do while((i > 0) & (Arr(i) > key)); Arr(i+1)=Arr(i); i= i - 1; end; Arr(i+1)= key; end; run;

proc print data=sortme; run;


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