Skip to content
Permalink
Browse files

Some clarification for integer bitwise XOR operators and others

Works towards #2939. The main problem is that Boolean bitwise
operators are not indexed, so they are hard to find. Coming up next.
  • Loading branch information...
JJ committed Aug 19, 2019
1 parent e8c3cfe commit 6be75b81efe5144a8eddc0c6b82fb728eec70962
Showing with 8 additions and 13 deletions.
  1. +1 −1 doc/Language/5to6-perlop.pod6
  2. +7 −12 doc/Language/operators.pod6
@@ -160,7 +160,7 @@ Binary C<&> is C<+&> in Perl 6.
=head2 Bitwise Or and Exclusive Or
Bitwise OR has changed from C<|> in Perl 5 to C<+|> in Perl 6.
Similarly, bitwise XOR C<^> is C<+^>
Similarly, bitwise XOR C<^> is C<+^>, except this operates on integers.
=head2 C-style Logical And
@@ -1019,10 +1019,9 @@ arguments.
multi sub prefix:<+^>(Any --> Int:D)
X<Integer bitwise negation operator>.
Coerces the argument to L<Int|/type/Int> and does a bitwise negation on the
result, assuming
L<two's complement|https://en.wikipedia.org/wiki/Two%27s_complement>.
X<Integer bitwise negation operator>: Coerces the argument to L<Int|/type/Int>
and does a bitwise negation on the result, assuming L<two's
complement|https://en.wikipedia.org/wiki/Two%27s_complement>.
=head2 prefix C«~^»
@@ -1215,19 +1214,15 @@ first.
multi sub infix:<+|>($a, $b --> Int:D)
X<Integer bitwise OR operator>.
Coerces both arguments to L<Int|/type/Int> and does a bitwise I<OR> (inclusive OR)
operation.
X<Integer bitwise OR operator>: Coerces both arguments to L<Int|/type/Int> and
does a bitwise I<OR> (inclusive OR) operation.
=head2 infix C«+^»
multi sub infix:<+^>($a, $b --> Int:D)
X<Integer bitwise XOR operator>.
Coerces both arguments to L<Int|/type/Int> and does a bitwise I<XOR> (exclusive OR)
operation.
X<Integer bitwise XOR operator>: Coerces both arguments to L<Int|/type/Int> and
does a bitwise I<XOR> (exclusive OR) operation.
=head2 infix C«~|»

0 comments on commit 6be75b8

Please sign in to comment.
You can’t perform that action at this time.