FAQ
Author: lwall
Date: 2010-06-26 19:46:00 +0200 (Sat, 26 Jun 2010)
New Revision: 31454

Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
[S03] change !% to %% to avoid metaconfusion


Modified: docs/Perl6/Spec/S03-operators.pod
===================================================================
--- docs/Perl6/Spec/S03-operators.pod 2010-06-26 17:43:10 UTC (rev 31453)
+++ docs/Perl6/Spec/S03-operators.pod 2010-06-26 17:46:00 UTC (rev 31454)
@@ -15,8 +15,8 @@

Created: 8 Mar 2004

- Last Modified: 24 Jun 2010
- Version: 211
+ Last Modified: 26 Jun 2010
+ Version: 212

=head1 Overview

@@ -36,7 +36,7 @@
N Autoincrement ++ --
R Exponentiation **
L Symbolic unary ! + - ~ ? | || +^ ~^ ?^ ^
- L Multiplicative * / % +& +< +> ~& ~< ~> ?& div mod
+ L Multiplicative * / % %% +& +< +> ~& ~< ~> ?& div mod
L Additive + - +| +^ ~| ~^ ?| ?^
L Replication x xx
X Concatenation ~
@@ -783,6 +783,18 @@

=item *

+C<< infix:<%%> >>, is divisible by
+
+ $x %% $y
+
+Performs a C<%> and then tests the result for 0, returning C<Bool::True> if
+the C<$x> is evenly divisible by C<$y>, and C<Bool::False> otherwise.
+
+You may use C<!%%> to mean "not divisible by", though C<%> itself generally
+has the same effect.
+
+=item *
+
C<< infix:<mod> >>, integer modulo

$x mod $y
@@ -3962,13 +3974,8 @@

The precedence of any negated operator is the same as the base operator.

-The operator
-
- !%
-
-is specially allowed for testing even divisibility by an integer.
-
-Note that logical operators such as C<||> and C<^^> do not return a Bool,
+You may negate only those operators that return a C<Bool>. Note that
+logical operators such as C<||> and C<^^> do not return a C<Bool>,
but rather one of the operands.

=head2 Reversed operators

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
categoriesperl
postedJun 26, '10 at 5:46p
activeJun 26, '10 at 5:46p
posts1
users1
websiteperl6.org

1 user in discussion

Pugs-commits: 1 post

People

Translate

site design / logo © 2021 Grokbase