Front page | perl.perl6.language |
Postings from June 2006
[svn:perl6-synopsis] r9681 - doc/trunk/design/syn
From:
larry
Date:
June 16, 2006 15:34
Subject:
[svn:perl6-synopsis] r9681 - doc/trunk/design/syn
Message ID:
20060616223348.87CD1CBA87@x12.develooper.com
Author: larry
Date: Fri Jun 16 15:33:47 2006
New Revision: 9681
Modified:
doc/trunk/design/syn/S03.pod
Log:
Fixing bad writing, mostly.
Modified: doc/trunk/design/syn/S03.pod
==============================================================================
--- doc/trunk/design/syn/S03.pod (original)
+++ doc/trunk/design/syn/S03.pod Fri Jun 16 15:33:47 2006
@@ -163,7 +163,7 @@
exclusively a syntactic distinction, and no semantic or type information
is used, since it influences subsequent parsing. In particular, even
if a function is known to return a scalar value from its declaration,
-you must use C<+> or or C<~> if you wish to force scalar parsing from
+you must use C<+> or C<~> if you wish to force scalar parsing from
within a subscript:
@a[foo()] = bar(); # foo() and bar() called in list context
@@ -180,11 +180,14 @@
side had been evaluated in list context (which is indeed the case)
but coerced into scalar context.
-If the left side returns a list, however, then regardless of whether the
-list contains a single or multiple values, the right side is bound
-as in a list assignment, and any extra values are discarded. To force
-list assignment even if the function returns a non-list, either put
-parens around the entire lvalue, or use a comma within the subscript.
+If the left side returns a list, however, then regardless of whether
+the list contains a single or multiple values, the right side values
+are assigned one by one as in any other list assignment, discarding any
+extra values if the right side is too long, or assigning undef if the
+right side is too short. To force list assignment when a subscript
+would return a non-list, either put parens around the entire lvalue,
+or use a comma within the subscript. (A semicolon in the subscript
+also works to indicate multidimensional slices.)
Assuming
-
[svn:perl6-synopsis] r9681 - doc/trunk/design/syn
by larry