[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the difference between "%s" and "%d"?

From: Tassilo Horn
Subject: Re: What is the difference between "%s" and "%d"?
Date: Sat, 01 Aug 2015 09:24:07 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Marcin Borkowski <address@hidden> 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]+


reply via email to

[Prev in Thread] Current Thread [Next in Thread]