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 (November 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 9 Nov 2005 01:43:13 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: number of digits after decimal dot
Comments: To: tonyyangsxz@GMAIL.COM
In-Reply-To:  <f00d287f0511081737g2816fd16hbb2677eea34e9457@mail.gmail.com>
Content-Type: text/plain; format=flowed

Tony,

Doing it that way will make a conversion from numeric to character implicitly. Do it that way and look at the log you will see a note in there telling you that a conversion was made. The problem I see is that al the sas functions that i can figure to use will do this implicit conversion.

Toby Dunn

From: Tony Yang <tonyyangsxz@GMAIL.COM> Reply-To: Tony Yang <tonyyangsxz@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: number of digits after decimal dot Date: Tue, 8 Nov 2005 20:37:00 -0500 MIME-Version: 1.0 Received: from mailgw.cc.uga.edu ([128.192.1.101]) by mc4-f8.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 8 Nov 2005 17:38:22 -0800 Received: from listserv.cc.uga.edu (listserv.uga.edu [128.192.1.75])by mailgw.cc.uga.edu (8.12.11/8.12.11) with ESMTP id jA8NdB2L028627;Tue, 8 Nov 2005 20:37:01 -0500 Received: from LISTSERV.UGA.EDU by LISTSERV.UGA.EDU (LISTSERV-TCP/IP release 1.8d) with spool id 2118783 for SAS-L@LISTSERV.UGA.EDU; Tue, 8 Nov 2005 20:37:01 -0500 Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.192]) by listserv.cc.uga.edu (8.12.11/8.12.11) with ESMTP id jA91b0Ea006192 for <SAS-L@listserv.uga.edu>; Tue, 8 Nov 2005 20:37:01 -0500 Received: by nproxy.gmail.com with SMTP id l24so15616nfc for <SAS-L@listserv.uga.edu>; Tue, 08 Nov 2005 17:37:00 -0800 (PST) Received: by 10.48.234.13 with SMTP id g13mr60127nfh; Tue, 08 Nov 2005 17:37:00 -0800 (PST) Received: by 10.48.249.8 with HTTP; Tue, 8 Nov 2005 17:37:00 -0800 (PST) X-Message-Info: eW1r7T5OXW48Ryy32pTi2FSmK3go9dIG58bC+Hw5eZA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;

h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references;

b=bsmK7O53QMlA3uWEwClJlGXNaFsmcWDg7RLI1ZdqoX2LZC3miYZr/Dy620kJL4xFIfJwYpRmfGFA8rnGf7+h6DxOL+q0049x1I15brGKsmNXRjjeIs/iFcE6pjiJ6sC2M9H6Qk1LR7NFyLhdL/tlkwXvK6C0CT026eoerKh8Z+I= References: <1131497954.271190.246200@g14g2000cwa.googlegroups.com> Comments: To: Philip Primak <pprimak@gmail.com> Return-Path: owner-sas-l@LISTSERV.UGA.EDU X-OriginalArrivalTime: 09 Nov 2005 01:38:23.0304 (UTC) FILETIME=[45A93480:01C5E4CE]

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 >


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