[prev in list] [next in list] [prev in thread] [next in thread]
List: perl6-language
Subject: [svn:perl6-synopsis] r14443 - doc/trunk/design/syn
From: larry () cvs ! develooper ! com
Date: 2007-08-30 8:51:05
Message-ID: 20070830085105.D62ABCBA2E () x12 ! develooper ! com
[Download RAW message or body]
Author: larry
Date: Thu Aug 30 01:51:05 2007
New Revision: 14443
Modified:
doc/trunk/design/syn/S03.pod
Log:
Clarification of identity values for min and max
Modified: doc/trunk/design/syn/S03.pod
==============================================================================
--- doc/trunk/design/syn/S03.pod (original)
+++ doc/trunk/design/syn/S03.pod Thu Aug 30 01:51:05 2007
@@ -12,9 +12,9 @@
Maintainer: Larry Wall <larry@wall.org>
Date: 8 Mar 2004
- Last Modified: 29 Aug 2007
+ Last Modified: 30 Aug 2007
Number: 3
- Version: 119
+ Version: 120
=head1 Overview
@@ -1025,7 +1025,25 @@
Instead of deciding whether to return the left or right based on booleans
or definedness, these return the minimum or maximum value. See also the
-minmax listop.
+C<minmax> listop.
+
+Not all types can support the concept of infinity. Therefore any
+value of any type may be compared with C<+Inf> or C<-Inf> values,
+in which case the infinite value stands for "larger/smaller than any
+possible value of the type." That is,
+
+ "foo" min +Inf # "foo"
+ "foo" min -Inf # -Inf
+ "foo" max +Inf # +Inf
+ "foo" max -Inf # "foo"
+
+All orderable object types must support C<+Inf> and C<-Inf> values
+as special forms of the undefined value. It's an error, however,
+to attempt to store an infinite value into a native type that cannot
+support it:
+
+ my int $max;
+ $max max= -Inf; # ERROR
=back
@@ -3173,6 +3191,8 @@
[||]() # Bool::False
[^^]() # Bool::False
[//]() # undef
+ [min]() # +Inf
+ [max]() # -Inf
[=]() # undef (same for all assignment operators)
[,]() # []
[Z]() # []
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic