Author: wayland
Date: 2009-03-09 22:43:40 +0100 (Mon, 09 Mar 2009)
New Revision: 25768
Modified:
docs/Perl6/Spec/S32-setting-library/Basics.pod
docs/Perl6/Spec/S32-setting-library/Numeric.pod
Log:
Added real/imaginary to Complex, and true/not to Object
Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-03-09 19:50:03 UTC
(rev 25767)
+++ docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-03-09 21:43:40 UTC
(rev 25768)
@@ -31,10 +31,13 @@
The following are defined in the C<Object> role:
role Object {
- our Bool multi method defined ($self:) {...}
- our Bool multi method defined ($self: ::role ) {...}
+ our Bool multi method defined ($self:) is export {...}
+ our Bool multi method defined ($self: ::role ) is export {...}
- our multi method undefine( $self: ) {...}
+ our multi method undefine( $self: ) is export {...}
+
+ method not() is export {...}
+ method true() is export {...}
}
=item defined
@@ -70,6 +73,25 @@
should place the object in the same state as if it was just
declared.
+=item not
+
+ method not() is export {...}
+
+=item true
+
+ method true() is export {...}
+
+XXX Copied from S02 -- should it be deleted from there?
+
+The definition of C<.true> for the most ancestral type (that is, the
+C<Object> type) is equivalent to C<.defined>. Since protoobjects are
+considered undefined, all protoobjects (including C<Object> itself)
+are false unless the type overrides the definition of C<.true>
+to include undefined values. Instantiated objects default to true
+unless the class overrides the definition. Note that if you could
+instantiate an C<Object> it would be considered defined, and thus true.
+(It is not clear that this is allowed, however.)
+
=head2 Any
The following are defined in the C<Any> role:
Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Numeric.pod 2009-03-09 19:50:03 UTC
(rev 25767)
+++ docs/Perl6/Spec/S32-setting-library/Numeric.pod 2009-03-09 21:43:40 UTC
(rev 25768)
@@ -210,6 +210,18 @@
Returns (magnitude, angle) corresponding to the complex number.
The magnitude is non-negative, and the angle in the range C<-π ..^ π>.
+=item real
+
+ method real() {...}
+
+Returns the real part of the complex number.
+
+=item imaginary
+
+ method imaginary() {...}
+
+Returns the imaginary part of a complex number.
+
=back
=head2 The :Trig tag