summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-02-28 20:32:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-02-28 20:32:53 +0000
commit972b05a9f47fc720f21b99b988037565a6a8181a (patch)
tree67c81ff1dca6e00f4f5f8bdaaca81b4de582e5d3 /pod/perlop.pod
parent6cc5f3e7559c04024f9a50632845af7b1516d5df (diff)
downloadperl-972b05a9f47fc720f21b99b988037565a6a8181a.tar.gz
Lift the 32-bit straightjacket from bit ops;
prefer IV/UV over NV in sv_2pv(). p4raw-id: //depot/cfgperl@5329
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod9
1 files changed, 6 insertions, 3 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index dfbdd19234..ce25298531 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -148,9 +148,12 @@ starts with a plus or minus, a string starting with the opposite sign
is returned. One effect of these rules is that C<-bareword> is equivalent
to C<"-bareword">.
-Unary "~" performs bitwise negation, i.e., 1's complement. For example,
-C<0666 &~ 027> is 0640. (See also L<Integer Arithmetic> and L<Bitwise
-String Operators>.)
+Unary "~" performs bitwise negation, i.e., 1's complement. For
+example, C<0666 & ~027> is 0640. (See also L<Integer Arithmetic> and
+L<Bitwise String Operators>.) Note that the width of the result is
+platform-dependent: ~0 is 32 bits wide on a 32-bit platform, but 64
+bits wide on a 64-bit platform, so if you are expecting a certain bit
+width, remember use the & operator to mask off the excess bits.
Unary "+" has no effect whatsoever, even on strings. It is useful
syntactically for separating a function name from a parenthesized expression