* What is the difference between "%s" and "%d"?
@ 2015-07-31 21:17 Marcin Borkowski
2015-08-01 7:24 ` Tassilo Horn
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Borkowski @ 2015-07-31 21:17 UTC (permalink / raw)
To: Help Gnu Emacs mailing list
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?
TIA,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What is the difference between "%s" and "%d"?
2015-07-31 21:17 What is the difference between "%s" and "%d"? Marcin Borkowski
@ 2015-08-01 7:24 ` Tassilo Horn
0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2015-08-01 7:24 UTC (permalink / raw)
To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list
Marcin Borkowski <mbork@mbork.pl> 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:
|
| %<flags><width><precision>character
|
| where flags is [+ #-0]+, width is [0-9]+, and precision is .[0-9]+
`----
Bye,
Tassilo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-01 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31 21:17 What is the difference between "%s" and "%d"? Marcin Borkowski
2015-08-01 7:24 ` Tassilo Horn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).