From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24113 invoked by alias); 18 Jan 2008 21:00:14 -0000 Received: (qmail 24102 invoked by uid 22791); 18 Jan 2008 21:00:13 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jan 2008 20:59:40 +0000 Received: from kahikatea.snap.net.nz (71.30.255.123.static.snap.net.nz [123.255.30.71]) by viper.snap.net.nz (Postfix) with ESMTP id 6DCEA3DA12E; Sat, 19 Jan 2008 09:59:32 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 671878FC6D; Sat, 19 Jan 2008 09:59:25 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18321.4908.498552.549376@kahikatea.snap.net.nz> Date: Fri, 18 Jan 2008 21:00:00 -0000 To: "Marc Khouzam" Cc: Subject: RE: -var-update using formatted value In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA2DE092@ecamlmw720.eamcs.ericsson.se> References: <6D19CA8D71C89C43A057926FE0D4ADAA04290E1B@ecamlmw720.eamcs.ericsson.se> <18311.60638.724524.220449@kahikatea.snap.net.nz> <20080111225928.GA26360@caradoc.them.org> <18311.65093.38930.103045@kahikatea.snap.net.nz> <20080111235219.GA29698@caradoc.them.org> <6D19CA8D71C89C43A057926FE0D4ADAA2DE08B@ecamlmw720.eamcs.ericsson.se> <20080112034900.GA8947@caradoc.them.org> <6D19CA8D71C89C43A057926FE0D4ADAA2DE08C@ecamlmw720.eamcs.ericsson.se> <18319.63598.936864.296815@kahikatea.snap.net.nz> <6D19CA8D71C89C43A057926FE0D4ADAA2DE092@ecamlmw720.eamcs.ericsson.se> X-Mailer: VM 7.19 under Emacs 23.0.50.32 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00179.txt.bz2 > I think you are referring to the code that uses "%.9g" The format "%#.9g" > could be used instead... But trailing zeros will not be removed at all, so > 1.0 will be 1.000000000 instead of 1 but this will also be true for numbers > like 1.11 which would not be 1.110000000 That is probably not a good thing If it's important, you could presumably print to a string first, do a regexp match and then add a decimal point if the number did not have one. -- Nick http://www.inet.net.nz/~nickrob