Date: Tue, 8 Nov 2005 20:37:00 -0500
Reply-To: Tony Yang <tonyyangsxz@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tony Yang <tonyyangsxz@GMAIL.COM>
Subject: Re: number of digits after decimal dot
In-Reply-To: <1131497954.271190.246200@g14g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi, Philip;
You can try to use SCAN function and set . as a delimiter, then you can use
LENGTH function to count the number of digits.
Hope this helps.
Best regards,
Tony
On 11/8/05, Philip Primak <pprimak@gmail.com> wrote:
>
> Hi
>
> What is the simplest way to calculate number of digits after decimal
> dot (without converting to character, etc)?
>
> x=1.2345 nd=4
> x=801.500 nd=1
> x=20 nd=0
> x=3.14 n=2
> ...
>
> Thank you
> Philip Primak
>
|