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 (October 2000, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 31 Oct 2000 20:41:41 +0000
Reply-To:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject:   Re: SAS/Base: automatic variable _n_ behavior
Comments:   To: greg.woolridge@TAP.COM
In-Reply-To:   <E13qhgo-0007iU-00@relay1.netnames.net>
Content-Type:   text/plain; charset="us-ascii"

At 14:09 31/10/00 -0600, Greg Woolridge wrote:

>Karsten, >I have to disagree with you. On page 455 of the "SAS Language and >Procedures Usage" manual it states "_N_ is an automatic variable whose >value is the number of times the SAS System has begun executing the DATA >step (1, 2, 3, and so on)." If it were the number of times that it passes >the implied return it would be equal to 0 (or missing) for the first >execution.

This seems to be a bit of a nitpicking disagreement to me. When Karsten wrote "_N_ counts the number of traversals past this implied RETURN." all he omitted to do in order to describe the situation correctly was to point out that _N_ is initialised as 1, not 0 (or missing) at the start of the very first iteration of the DATA step.

Beyond that, it is academic to argue as to whether the incrementing of _N_ occurs on executing an (implicit or explicit) RETURN or the start of the next iteration ... since the latter is an inevitable consequence of the former, and there is no way of examining the value of _N_ in between the two!

That's how I see it, anyway!

Kind Regards,

John

---------------------------------------------------------------- Dr John Whittington, Voice: +44 (0) 1296 730225 Mediscience Services Fax: +44 (0) 1296 738893 Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk Buckingham MK18 4EL, UK mediscience@compuserve.com ----------------------------------------------------------------


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