[svn:parrot] r46602 - trunk/docs/book/pct

gerd at svn.parrot.org gerd at svn.parrot.org
Fri May 14 08:06:01 UTC 2010


Author: gerd
Date: Fri May 14 08:06:00 2010
New Revision: 46602
URL: https://trac.parrot.org/parrot/changeset/46602

Log:
add some missing semicolons; add a my declaration at the first example to illustrate the need of a declaration before using a variable

Modified:
   trunk/docs/book/pct/ch05_nqp.pod

Modified: trunk/docs/book/pct/ch05_nqp.pod
==============================================================================
--- trunk/docs/book/pct/ch05_nqp.pod	Fri May 14 07:40:19 2010	(r46601)
+++ trunk/docs/book/pct/ch05_nqp.pod	Fri May 14 08:06:00 2010	(r46602)
@@ -43,9 +43,11 @@
 interchangeably contain given a string value, an integer value, or an object
 reference. Simple NQP assignments are:
 
- $scalar := "This is a string"
- $x      := 123
- $pi     := 3.1415      # rounding
+  my $scalar;  my $x;  my $pi;
+  # assignments are:
+  $scalar := "This is a string";
+  $x      := 123;
+  $pi     := 3.1415;      # rounding
 
 X<bind operator>
 X<operators; binding>
@@ -75,7 +77,7 @@
 
 It's also possible to assign a list in I<scalar context>:
 
- $array_but_a_scalar := (1, 2, 3, 4)
+  $array_but_a_scalar := (1, 2, 3, 4);
 
 Or you could write a new function in PIR to create a new array from a variadic
 argument list:


More information about the parrot-commits mailing list