Skip to content

Commit 704f4a0

Browse files
committed
Add docs for buffer bitwise operators
1 parent bbfe152 commit 704f4a0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

doc/Language/operators.pod6

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,13 @@ X<Integer bitwise negation operator>.
823823
Coerces the argument to L<Int> and does a bitwise negation on the result,
824824
assuming L<two's complement|https://en.wikipedia.org/wiki/Two%27s_complement>.
825825
826+
=head2 prefix C«~^»
827+
828+
Coerces the argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
829+
and then flips each bit in that buffer.
830+
831+
Please note that this has not yet been implemented.
832+
826833
=head2 prefix C«?^»
827834
828835
=begin code :skip-test
@@ -935,6 +942,26 @@ multi sub infix:<< +> >>($a, $b) returns Int:D
935942
936943
Integer bit shift to the right.X<|integer bit shift operator,right>
937944
945+
=head2 infix C«~&»
946+
947+
Coerces each argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
948+
and then performs a numeric bitwise AND on corresponding integers of the two buffers, padding the
949+
shorter buffer with zeroes.
950+
951+
=head2 infix C«~<»
952+
953+
Coerces the left argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
954+
and then performs a numeric bitwise left shift on the bits of the buffer.
955+
956+
Please note that this has not yet been implemented.
957+
958+
=head2 infix C«~>»
959+
960+
Coerces the left argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
961+
and then performs a numeric bitwise right shift on the bits of the buffer.
962+
963+
Please note that this has not yet been implemented.
964+
938965
=head2 infix C«gcd»
939966
940967
=begin code :skip-test
@@ -997,6 +1024,18 @@ X<Integer bitwise XOR operator>.
9971024
Coerces both arguments to L<Int> and does a bitwise I<XOR> (exclusive OR)
9981025
operation.
9991026
1027+
=head2 infix C«~|»
1028+
1029+
Coerces each argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
1030+
and then performs a numeric bitwise OR on corresponding integers of the two buffers, padding the
1031+
shorter buffer with zeroes.
1032+
1033+
=head2 infix C«~^»
1034+
1035+
Coerces each argument to a non-variable-encoding string buffer type (eg. C<buf8>, C<buf16>, C<buf32>)
1036+
and then performs a numeric bitwise XOR on corresponding integers of the two buffers, padding the
1037+
shorter buffer with zeroes.
1038+
10001039
=head2 infix C«?|»
10011040
10021041
=begin code :skip-test

0 commit comments

Comments
 (0)