summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-04-29 16:33:47 +1200
committerChip Salzenberg <chip@atlantic.net>1997-05-08 00:00:00 +1200
commit1b3f7d2103791ceee4a17b0f9f5860baa1512c7a (patch)
tree0cae7e7e45fe47bd5e64fd647df890ff4fbbe70b
parent28d1fb14ad09326ebbecb0b9fbd709bed7f0603b (diff)
downloadperl-1b3f7d2103791ceee4a17b0f9f5860baa1512c7a.tar.gz
Refresh description of sprintf()
-rw-r--r--pod/perl.pod4
-rw-r--r--pod/perlfunc.pod19
2 files changed, 10 insertions, 13 deletions
diff --git a/pod/perl.pod b/pod/perl.pod
index c7b84520df..3036f35b21 100644
--- a/pod/perl.pod
+++ b/pod/perl.pod
@@ -275,8 +275,8 @@ switch?
The B<-w> switch is not mandatory.
Perl is at the mercy of your machine's definitions of various
-operations such as type casting, atof(), and sprintf(). The latter
-can even trigger a core dump when passed ludicrous input values.
+operations such as type casting, atof(), and floating-point
+output with sprintf().
If your stdio requires a seek or eof between reads and writes on a
particular stream, so does Perl. (This doesn't apply to sysread()
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 823355b363..e3c4c9546d 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3118,19 +3118,19 @@ Perl's sprintf() permits the following universally-known conversions:
%f a floating-point number, in fixed decimal notation
%g a floating-point number, in %e or %f notation
-In addition, Perl permits the following ANSI-invented conversions:
+In addition, Perl permits the following widely-supported conversions:
- %i a synonym for %d
%X like %x, but using upper-case letters
%E like %e, but using an upper-case "E"
%G like %g, but with an upper-case "E" (if applicable)
%p a pointer (outputs the Perl value's address in hexadecimal)
- %n special: B<stores> into the next variable in the parameter
- list the number of characters printed so far
+ %n special: *stores* the number of characters output so far
+ into the next variable in the parameter list
-Finally, for backward (and we do mean "backward") compatibility,
-Perl permits these nonstandard but unaccountably popular conversions:
+Finally, for backward (and we do mean "backward") compatibility, Perl
+permits these unnecessary but widely-supported conversions:
+ %i a synonym for %d
%D a synonym for %ld
%U a synonym for %lu
%O a synonym for %lo
@@ -3143,17 +3143,14 @@ and the conversion letter:
+ prefix positive number with a plus sign
- left-justify within the field
0 use zeros, not spaces, to right-justify
+ # prefix octal with "0", hex with "0x"
number minimum field width
.number "precision": digits after decimal point for floating-point,
max length for string, minimum length for integer
l interpret integer as C type "long" or "unsigned long"
-
-In addition, Perl permits the following ANSI-invented flags:
-
- # prefix octal with "0", hex with "0x"
h interpret integer as C type "short" or "unsigned short"
-Finally, there is one Perl-specific flag:
+There is also one Perl-specific flag:
V interpret integer as Perl's standard integer type