Date: Wed, 12 Jan 2000 14:23:36 -0800
Reply-To: Robert Virgile <virgile@MEDIAONE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robert Virgile <virgile@MEDIAONE.NET>
Subject: Re: the first digit of the number
Content-Type: text/plain; charset=us-ascii
As one poster noted -- can we assume that we're dealing with positive
numbers?
Here's a method (untested):
first = input(put(number, best8.), :1.);
My intention (if this works): The colon scans the incoming string
looking for a nonblank. Once it finds a nonblank, the input function
applies the informat, reading the first character.
If the colon won't work inside the input function, you'd have to apply
the left function instead:
input(left(put( etc.
Bob V.
|