Mercurial > emacs
comparison lispref/strings.texi @ 75951:cc22dbc5d5a3
(Formatting Strings): Document '+' flag.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 16 Feb 2007 13:21:44 +0000 |
parents | f8a7b43bdcbf |
children | e303881b06eb |
comparison
equal
deleted
inserted
replaced
75950:f7b102b31618 | 75951:cc22dbc5d5a3 |
---|---|
885 | 885 |
886 @cindex flags in format specifications | 886 @cindex flags in format specifications |
887 Immediately after the @samp{%} and before the optional width and | 887 Immediately after the @samp{%} and before the optional width and |
888 precision, you can put certain ``flag'' characters. | 888 precision, you can put certain ``flag'' characters. |
889 | 889 |
890 A space character inserts a space for positive numbers (otherwise | 890 A space character inserts a space for positive numbers, a plus character |
891 nothing is inserted for positive numbers). This flag is ignored | 891 inserts a plus sign (otherwise nothing is inserted for positive |
892 except for @samp{%d}, @samp{%e}, @samp{%f}, @samp{%g}. | 892 numbers). These flags are ignored except for @samp{%d}, @samp{%e}, |
893 @samp{%f}, @samp{%g}, and if both flags are present the space is | |
894 ignored. | |
893 | 895 |
894 The flag @samp{#} indicates ``alternate form.'' For @samp{%o} it | 896 The flag @samp{#} indicates ``alternate form.'' For @samp{%o} it |
895 ensures that the result begins with a 0. For @samp{%x} and @samp{%X} | 897 ensures that the result begins with a 0. For @samp{%x} and @samp{%X} |
896 the result is prefixed with @samp{0x} or @samp{0X}. For @samp{%e}, | 898 the result is prefixed with @samp{0x} or @samp{0X}. For @samp{%e}, |
897 @samp{%f}, and @samp{%g} a decimal point is always shown even if the | 899 @samp{%f}, and @samp{%g} a decimal point is always shown even if the |