Return multiple values: Difference between revisions
no edit summary
(Rust version) |
No edit summary |
||
Line 1,340:
return (complex(a, b) );
end comp;</lang>
=={{header|PowerShell}}==
{{works with|PowerShell|4.0}}
<lang PowerShell>
function multiple-value ($a, $b) {
[pscustomobject]@{
a = $a
b = $b
}
}
$m = multiple-value "value" 1
$m.a
$m.b
</lang>
<b>Output:</b>
<pre>
value
1
</pre>
=={{header|PureBasic}}==
|