From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: What is the difference between "%s" and "%d"? Date: Sat, 01 Aug 2015 09:24:07 +0200 Message-ID: <87io8zpj3c.fsf@gnu.org> References: <877fpgvxgh.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438413877 29997 80.91.229.3 (1 Aug 2015 07:24:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 07:24:37 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 09:24:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZLR9e-0000ZO-0J for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 09:24:26 +0200 Original-Received: from localhost ([::1]:46997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLR9d-00032e-8O for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 03:24:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLR9U-00032W-3O for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 03:24:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLR9O-00078D-Qm for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 03:24:16 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLR9O-000785-Kj for help-gnu-emacs@gnu.org; Sat, 01 Aug 2015 03:24:10 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2384E20336 for ; Sat, 1 Aug 2015 03:24:10 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 01 Aug 2015 03:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=JHxbOfPgUiA2/TGbOoH7/37nesc=; b=d6yjO DVQ/gRcJqT+6PxqQ1aLoQFPZ6gOrOfuq2lZqgo8rNrTDdBZiKrP8FU6aIBETPu1E 1bXZS0HdiT2QoKVqyauJsMc0QI1IA7fTGa1m/KtQf+H0hsaQ64y7srzDAKqZ5eWz s4NmedFI44zaUqQb/2OmjwnB1TYIM7m2YljClw= X-Sasl-enc: Ut4IxEk0ZEqB71sg2LXBkuL1KczYntJvJpBx7zY53stj 1438413849 Original-Received: from thinkpad-t440p (unknown [2.161.13.225]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CA37C00017; Sat, 1 Aug 2015 03:24:09 -0400 (EDT) Mail-Followup-To: Marcin Borkowski , Help Gnu Emacs mailing list In-Reply-To: <877fpgvxgh.fsf@mbork.pl> (Marcin Borkowski's message of "Fri, 31 Jul 2015 23:17:18 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106181 Archived-At: Marcin Borkowski writes: > Hi all, > > consider two forms: > > (format "%d" int) > > and > > (format "%s" int) > > Assuming that `int' is bound to an integer, is there any difference > between the two? No, but for a number-%-sequence there are many flags available to customize how it is printed. ,----[ C-h f format RET ] | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. | Use %% to put a single % into the output. | | A %-sequence may contain optional flag, width, and precision | specifiers, as follows: | | %character | | where flags is [+ #-0]+, width is [0-9]+, and precision is .[0-9]+ `---- Bye, Tassilo