From: Gurusamy Sarathy Date: Thu, 4 Mar 1999 05:03:30 +0000 (+0000) Subject: more s/s_/s!/ etc. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d0c1c44b6764966a3c975cf76bf3a3a7e41f6bd;p=p5sagit%2Fp5-mst-13.2.git more s/s_/s!/ etc. p4raw-id: //depot/perl@3065 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 738d7f9..022fe92 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -156,7 +156,7 @@ now correctly prints "3|a", instead of "2|a". The new format type 'Z' is useful for packing and unpacking null-terminated strings. See L. -=head2 pack() format modifier '_' supported +=head2 pack() format modifier '!' supported The new format type modifer '!' is useful for packing and unpacking native shorts, ints, and longs. See L. diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a193d67..b8580ed 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2598,7 +2598,7 @@ follows: i A signed integer value. I An unsigned integer value. - (This 'integer' is _at_least_ 32 bits wide. Its exact + (This 'integer' is _at least_ 32 bits wide. Its exact size depends on what a local C compiler calls 'int', and may even be larger than the 'long' described in the next item.) @@ -2679,16 +2679,16 @@ C<"P"> is C. =item * The integer types C<"s">, C<"S">, C<"l">, and C<"L"> may be -immediately followed by a C<"_"> to signify native shorts or longs--as +immediately followed by a C<"!"> to signify native shorts or longs--as you can see from above for example a bare C<"l"> does mean exactly 32 bits, the native C (as seen by the local C compiler) may be larger. This is an issue mainly in 64-bit platforms. You can see -whether using C<"_"> makes any difference by +whether using C<"!"> makes any difference by - print length(pack("s")), " ", length(pack("s_")), "\n"; - print length(pack("l")), " ", length(pack("l_")), "\n"; + print length(pack("s")), " ", length(pack("s!")), "\n"; + print length(pack("l")), " ", length(pack("l!")), "\n"; -C<"i_"> and C<"I_"> also work but only because of completeness; +C<"i!"> and C<"I!"> also work but only because of completeness; they are identical to C<"i"> and C<"I">. The actual sizes (in bytes) of native shorts, ints, and longs on