Skip to content

Commit 95d5707

Browse files
committed
Adds the Boolean bitwise XOR operator
Which was not documented. That closes #2939
1 parent 6be75b8 commit 95d5707

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

doc/Language/operators.pod6

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,10 +1034,8 @@ Please note that this has not yet been implemented.
10341034
10351035
multi sub prefix:<?^>(Mu --> Bool:D)
10361036
1037-
X<Boolean bitwise negation operator>.
1038-
1039-
Coerces the argument to L<Bool|/type/Bool> and then does a bit flip, which makes it the
1040-
same as C<< prefix:<!> >>.
1037+
X<Boolean bitwise negation operator>: Coerces the argument to L<Bool|/type/Bool>
1038+
and then does a bit flip, which makes it the same as C<< prefix:<!> >>.
10411039
10421040
=head2 prefix C«^»
10431041
@@ -1236,6 +1234,15 @@ Coerces each argument to a non-variable-encoding string buffer type (e.g. C<buf8
12361234
and then performs a numeric bitwise XOR on corresponding integers of the two buffers, padding the
12371235
shorter buffer with zeroes.
12381236
1237+
=head2 infix C«?^»
1238+
1239+
multi sub infix:<?^>(Mu $x = Bool::False)
1240+
multi sub infix:<?^>(Mu \a, Mu \b)
1241+
1242+
X<Boolean bitwise XOR operator>: Coerces the argument(s) to L<Bool|/type/Bool>
1243+
and performs logical XOR on them: it will return True if and only if just one of
1244+
the argument is true. It returns identity on a single argument.
1245+
12391246
=head2 infix C«?|»
12401247
12411248
multi sub infix:<?|>($a, $b --> Bool:D)

0 commit comments

Comments
 (0)