returning multiple values

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

returning multiple values

rvjansen
From: [hidden email] on 04/14/98 10:17 PM ZE9

>If I could find someone who can answer my humble NetRexx question.
>In C, I could
>calc(2, 3, &added, &substs)
>or something like that.

>I can do with only one return value in NetRexx, but with more than
one
>return values,
>added=calc(2,3)
>say added
>could someone help me?
>kikuti

Looking into my own execs it seems the most pragmatic option is to
return an indexed
variable (probably indexed by useful string names)

(from my netrexx pipe xlate stage):
tables = processRanges(toTable, fromTable )

method processRanges(a=rexx, b=rexx)
(...)
tables = "tables"
tables['a'] = c.reverse() -- standard rexx xlate function uses
leftmost duplicate first
tables['b'] = d.reverse() -- so reverse to make overrides possible;

return tables


René Jansen
Amsterdam
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: returning multiple values

kikuti
Many thanks to everyone.  I will study the examples you all gave me.
I would like to have the best processing time, because it's for Japanese
chess program.

kikuti

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>