From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: Floating-point formatting string Date: Tue, 13 Feb 2007 23:42:03 -0200 Message-ID: <45D268EB.6080501@ig.com.br> References: <45D2630F.70105@ig.com.br> <87mz3hy0ze.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171417266 15480 80.91.229.12 (14 Feb 2007 01:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2007 01:41:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 14 02:40:59 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HH98k-0000GY-1P for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2007 02:40:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HH98j-0001tw-LS for ged-emacs-devel@m.gmane.org; Tue, 13 Feb 2007 20:40:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HH98Y-0001sa-2u for emacs-devel@gnu.org; Tue, 13 Feb 2007 20:40:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HH98W-0001q0-Mk for emacs-devel@gnu.org; Tue, 13 Feb 2007 20:40:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HH98W-0001pn-GI for emacs-devel@gnu.org; Tue, 13 Feb 2007 20:40:44 -0500 Original-Received: from smtpout12.uol.com.br ([200.221.4.203] helo=smtp.uol.com.br) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HH98W-00043i-2q for emacs-devel@gnu.org; Tue, 13 Feb 2007 20:40:44 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by socom6.uol.com.br (Postfix) with ESMTP id D766E5003AB1; Tue, 13 Feb 2007 23:40:42 -0200 (BRST) Original-Received: from [201.82.35.154] (unknown [201.82.35.154]) by socom6.uol.com.br (Postfix) with ESMTP id A6E145003679; Tue, 13 Feb 2007 23:40:34 -0200 (BRST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 In-Reply-To: <87mz3hy0ze.fsf@stupidchicken.com> X-SIG5: 5048e69dcbe429eb83ab78009b76de36 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66360 Archived-At: Chong Yidong wrote: > Vinicius Jose Latorre writes: > > >> Hi, >> >> >> It seems that there is a problem with floating-point formatting string >> in Emacs 22. >> >> Type >> M-: (format "%03.3f" 1.2) RET >> ==> "1.200" >> >> Shouldn't it be "001.200"? >> > > The Elisp manual says, of the width specification: > > If the printed representation of the object contains fewer > characters than this width, then it is padded. > > In this case, the 03 refers to the width of the entire string "1.200", > which is 5 > 3. > > For example, > > M-: (format "%08.3f" 1.2) > ==> 0001.200 > Ok, thanks