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 (November 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 9 Nov 2005 08:39:03 -0500
Reply-To:   "Fehd, Ronald J" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J" <rjf2@CDC.GOV>
Subject:   Re: consecutive numbers
Content-Type:   text/plain; charset="US-ASCII"

> From: Dirk Nachbar > what is the best way to multiply two consecutive numbers > x_{i}*x_{i-1} ?

arrays:

%Let Dim = 3;

DATA Products; array X (&Dim.); array Y (&Dim.);

drop I;

*magic happens her to populate array X; * set X?;

Y(1)=.;*unknown: no X(0);

do I = 2 to dim(X); Y = X(I)*X(I-1); end;

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

"Nothing is particularly hard if you divide it into small jobs." - Henry Ford, Industrialist


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