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 (January 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 12 Jan 2000 18:13:55 GMT
Reply-To:   jiwaniszek@nc.rr.com
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   John Iwaniszek <jiwaniszek@NC.RR.COM>
Organization:   Road Runner - NC
Subject:   Re: the first digit of the number
Content-Type:   text/plain; charset=us-ascii

How about:

if number>. then firstdig=substr( left( number), 1, 1);

"Primak, Philip" wrote: > > Dear SAS-L, > > I have to get the first digit of the number. Is there something more simple > and elegant than > > firstdgt=input(substr(scan(put(number,best8.),1),1,1),best8.); > > Thanks, > Philip Primak > Genzyme Corp.


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