Mercurial > emacs
comparison lispref/strings.texi @ 35036:956652ab5efc
%X, %E, %G in format strings.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 04 Jan 2001 11:31:56 +0000 |
parents | 79122ed1162e |
children | bf884d9d7949 |
comparison
equal
deleted
inserted
replaced
35035:610ac8a2b8a5 | 35036:956652ab5efc |
---|---|
661 @item %d | 661 @item %d |
662 Replace the specification with the base-ten representation of an | 662 Replace the specification with the base-ten representation of an |
663 integer. | 663 integer. |
664 | 664 |
665 @item %x | 665 @item %x |
666 @itemx %X | |
666 @cindex integer to hexadecimal | 667 @cindex integer to hexadecimal |
667 Replace the specification with the base-sixteen representation of an | 668 Replace the specification with the base-sixteen representation of an |
668 integer. | 669 integer. @samp{%x} uses lower case and @samp{%X} uses upper case. |
669 | 670 |
670 @item %c | 671 @item %c |
671 Replace the specification with the character which is the value given. | 672 Replace the specification with the character which is the value given. |
672 | 673 |
673 @item %e | 674 @item %e |
675 @itemx %E | |
674 Replace the specification with the exponential notation for a floating | 676 Replace the specification with the exponential notation for a floating |
675 point number. | 677 point number. @samp{%e} uses lower case @samp{e} for the exponent and |
678 @samp{%E} uses upper case. | |
676 | 679 |
677 @item %f | 680 @item %f |
678 Replace the specification with the decimal-point notation for a floating | 681 Replace the specification with the decimal-point notation for a floating |
679 point number. | 682 point number. |
680 | 683 |
681 @item %g | 684 @item %g |
685 @itemx %G | |
682 Replace the specification with notation for a floating point number, | 686 Replace the specification with notation for a floating point number, |
683 using either exponential notation or decimal-point notation, whichever | 687 using either exponential notation or decimal-point notation, whichever |
684 is shorter. | 688 is shorter. @samp{%G} uses upper case if an exponent is printed. |
685 | 689 |
686 @item %% | 690 @item %% |
687 Replace the specification with a single @samp{%}. This format specification is | 691 Replace the specification with a single @samp{%}. This format |
688 unusual in that it does not use a value. For example, @code{(format "%% | 692 specification is unusual in that it does not use a value. For example, |
689 %d" 30)} returns @code{"% 30"}. | 693 @code{(format "%% %d" 30)} returns @code{"% 30"}. |
690 @end table | 694 @end table |
691 | 695 |
692 Any other format character results in an @samp{Invalid format | 696 Any other format character results in an @samp{Invalid format |
693 operation} error. | 697 operation} error. |
694 | 698 |