| 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.
|