Return multiple values: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,481: | Line 1,481: | ||
<lang visualfoxpro>FUNCTION Addsub( x, y ) |
<lang visualfoxpro>FUNCTION Addsub( x, y ) |
||
RETURN { x + y, x - y }</lang> |
RETURN { x + y, x - y }</lang> |
||
However, we can 'return' multiple individual values, that are produced/processed/altered inside a function, indirectly, passing parameters `by reference`. |
However, we can 'return' multiple individual values, that are produced/processed/altered inside a function, indirectly, passing parameters `by reference`. |
||
⚫ | |||
⚫ | |||
<lang visualfoxpro> |
<lang visualfoxpro> |
||
PROCEDURE Main() |
PROCEDURE Main() |
||
Line 1,500: | Line 1,500: | ||
cCn:= "FOSSLAND" |
cCn:= "FOSSLAND" |
||
RETURN .T. |
RETURN .T. |
||
</lang> |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |