[svn:parrot] r43426 - trunk/docs/pmc

coke at svn.parrot.org coke at svn.parrot.org
Tue Jan 12 13:40:10 UTC 2010


Author: coke
Date: Tue Jan 12 13:40:10 2010
New Revision: 43426
URL: https://trac.parrot.org/parrot/changeset/43426

Log:
Changed incorrect opcode in example, Removed duplicate section. 

Courtesy aninhumer++

Modified:
   trunk/docs/pmc/subs.pod

Modified: trunk/docs/pmc/subs.pod
==============================================================================
--- trunk/docs/pmc/subs.pod	Tue Jan 12 13:32:57 2010	(r43425)
+++ trunk/docs/pmc/subs.pod	Tue Jan 12 13:40:10 2010	(r43426)
@@ -241,33 +241,6 @@
 PIR supports a convenient syntax for returning any number of values from a sub
 or closure:
 
-
-To test whether a value was returned, declare it C<:optional>, and follow it
-with an integer register declared C<:opt_val>:
-
-=begin PIR_FRAGMENT_INVALID
-
-    ($P10 :optional, $I10 :opt_val) = do_something($P1, $S3)
-
-=end PIR_FRAGMENT_INVALID
-
-Both of these affect only the signature provided via C<get_results>.
-
-[should also describe :flat, :slurpy, :named, ..., or at least provide a
-reference.  -- rgr, 25-May-08.]
-
-=begin PIR_FRAGMENT
-
-    # Call the sub in $P8, with continuation (created earlier) in $P9.
-    invoke $P8, $P9
-
-=end PIR_FRAGMENT
-
-=head2 Returning from a sub
-
-PIR supports a convenient syntax for returning any number of values from a sub
-or closure:
-
 =begin PIR
 
     .sub main 
@@ -281,7 +254,7 @@
 
 =begin PIR_FRAGMENT
 
-    get_results '(0,0,0)', $P0, $I1, $S3
+    set_returns '(0,0,0)', $P0, $I1, $S3
     returncc	# return by calling the current continuation
 
 =end PIR_FRAGMENT


More information about the parrot-commits mailing list