Return multiple values: Difference between revisions

m
→‎{{header|REXX}}: removed superflous blanks. -- ~~~~
m (→‎{{header|REXX}}: removed superflous blanks. -- ~~~~)
Line 742:
<br>string into the desired substrings (or values, if you will) with the handy-dandy <tt> PARSE </tt> statement.
<lang REXX>/*REXX program shows examples of multiple RETURN values from a function.*/
 
numeric digits 70 /*default is: NUMERIC DIGITS 9 */
arg a b /*get 2 numbers from comand line.*/
Line 761 ⟶ 760:
say '** =' pow
exit
 
/*─────────────────────────────────────giveMeBackStuff subroutine───────*/
giveMeBackStuff: procedure; parse arg x,y
Line 772 ⟶ 770:
power = x**y
return addition subtract modulus divide intDiv multiply power
 
/*─────────────────────────────────────giveMeBackStuff2 subroutine──────*/
giveMeBackStuff2: procedure; parse arg x,y
return x+y x-y x//y x/y x%y x*y x**y /*same as version above.*/</lang>
</lang>
'''output''' when invoked with the input: <tt> 82 20 </tt>
<pre>