r30059 - in docs/Perl6/Spec: . S32-setting-library

2010-03-13 Thread pugs-commits
Author: vamped
Date: 2010-03-13 12:07:29 +0100 (Sat, 13 Mar 2010)
New Revision: 30059

Modified:
   docs/Perl6/Spec/S29-functions.pod
   docs/Perl6/Spec/S32-setting-library/Containers.pod
Log:
changed scalar context into item context as per S02

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2010-03-13 00:47:56 UTC (rev 30058)
+++ docs/Perl6/Spec/S29-functions.pod   2010-03-13 11:07:29 UTC (rev 30059)
@@ -317,9 +317,9 @@
 would be downgraded in context.
 
 Cord goes the other direction; it takes a string value and returns
-character values as integers.  In a scalar context, the return value
+character values as integers.  In item context, the return value
 is the just the integer value of the first character in the string. In
-a list context, the return value is the list of integers representing
+list context, the return value is the list of integers representing
 the entire string.  The definition of character is pragma dependent.
 Normally it's a grapheme id, but under codepoints or bytes scopes,
 the string is coerced to the appropriate low-level view and interpreted

Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod
===
--- docs/Perl6/Spec/S32-setting-library/Containers.pod  2010-03-13 00:47:56 UTC 
(rev 30058)
+++ docs/Perl6/Spec/S32-setting-library/Containers.pod  2010-03-13 11:07:29 UTC 
(rev 30059)
@@ -582,7 +582,7 @@
 dimension, and works with Array References.
 
 Csplice returns a CParcel of the deleted elements, which behaves as
-expected in either list or scalar context.
+expected in either list or item context.
 
 
 =item unshift



r30065 - docs/Perl6/Spec

2010-03-13 Thread pugs-commits
Author: Darren_Duncan
Date: 2010-03-14 01:05:21 +0100 (Sun, 14 Mar 2010)
New Revision: 30065

Modified:
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S29-functions.pod
Log:
the '%','mod' are the 'modulo' op; 'modulus' is either what you call the result 
besides 'remainder', or it is another name for 'absolute value' op

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2010-03-13 23:18:57 UTC (rev 30064)
+++ docs/Perl6/Spec/S03-operators.pod   2010-03-14 00:05:21 UTC (rev 30065)
@@ -771,18 +771,18 @@
 
 =item *
 
-C infix:% , modulus
+C infix:% , modulo
 
 $x % $y
 
 If necessary, coerces non-numeric arguments to an appropriate CNumeric type,
-then calculates the modulus, which is defines as:
+then calculates the remainder, which is defines as:
 
 $x % $y == $x - floor($x / $y) * $y
 
 =item *
 
-C infix:mod , generic modulus
+C infix:mod , generic modulo
 
 $x mod $y
 

Modified: docs/Perl6/Spec/S29-functions.pod
===
--- docs/Perl6/Spec/S29-functions.pod   2010-03-13 23:18:57 UTC (rev 30064)
+++ docs/Perl6/Spec/S29-functions.pod   2010-03-14 00:05:21 UTC (rev 30065)
@@ -798,7 +798,7 @@
 
  $num1 % $num2
 
-Does a floating point modulus operation, i.e. 5.5 % 1 == 0.5 and 5 % 2.5 == 0.
+Does a floating point modulo operation, i.e. 5.5 % 1 == 0.5 and 5 % 2.5 == 0.
 
 =item dbmopen, dbmclose
 



Re: r29931 - docs/Perl6/Spec

2010-03-13 Thread Darren Duncan
I think I found a Synopsis fossil, in light of revision 29931, but wanted to be 
sure ...


pugs-comm...@feather.perl6.nl wrote:

Author: lwall
Date: 2010-03-03 18:34:04 +0100 (Wed, 03 Mar 2010)
New Revision: 29931

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] remove 1/2 and +2-3i literal forms, now rely on angle dwimmery for 
literals,
or constant folding otherwise.

snip

 Complex literals are similarly indicated by writing an addition or subtraction 
of
-two real numbers without spaces:
+two real numbers (again, without spaces around the operators) inside angles:
 
-5.2+1e42i

-3-1i
+5.2+1e42i
+ -3-1i 
 
 As with rational literals, constant folding would produce the same

 complex number, but this form parses as a single term, ignoring
 surrounding precedence.

snip

Basically, I found this line in Synopsis 2, in the section talking about 
unspace:

1+3\  i;

So the question is about whether this example should be kept as still valid code 
or whether it is now invalid and a fossil?


I suspect it *is* still valid, at least if this by itself:

3i

... is a valid literal denoting 0+3i, but wanted to check.

-- Darren Duncan


Re: r29931 - docs/Perl6/Spec

2010-03-13 Thread Larry Wall
On Sat, Mar 13, 2010 at 08:53:02PM -0800, Darren Duncan wrote:
: Basically, I found this line in Synopsis 2, in the section talking about 
unspace:
: 
: 1+3\  i;
: 
: So the question is about whether this example should be kept as
: still valid code or whether it is now invalid and a fossil?
: 
: I suspect it *is* still valid, at least if this by itself:
: 
: 3i
: 
: ... is a valid literal denoting 0+3i, but wanted to check.

Yes, both of those are still valid.  Thanks.

In fact, the \ is required if you want to use a variable:

$foo + $bar\i

Well, I suppose you could also write that as:

$foo + ($bar)i

but that could be construed as clunkier.  Or at least more typing.

Larry