From 8719fc7aaa90870f80e2bb6d616fe046f149cc5e Mon Sep 17 00:00:00 2001 From: "Will \"Coke\" Coleda" Date: Tue, 12 Jan 2010 13:40:10 +0000 Subject: [PATCH] Changed incorrect opcode in example, Removed duplicate section. Courtesy aninhumer++ git-svn-id: https://svn.parrot.org/parrot/trunk@43426 d31e2699-5ff4-0310-a27c-f18f2fbe73fe --- docs/pmc/subs.pod | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/docs/pmc/subs.pod b/docs/pmc/subs.pod index ae4bcfa7d3..72fee2262d 100644 --- a/docs/pmc/subs.pod +++ b/docs/pmc/subs.pod @@ -215,33 +215,6 @@ To receive multiple values, put the register names in parentheses: =end PIR_FRAGMENT -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. - -[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: - - To test whether a value was returned, declare it C<:optional>, and follow it with an integer register declared C<:opt_val>: @@ -281,7 +254,7 @@ to: =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