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


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