Call a function: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 4,458: | Line 4,458: | ||
put arg1 && "-" && arg2 && "-" && arg3 |
put arg1 && "-" && arg2 && "-" && arg3 |
||
end CustomHandler</lang> |
end CustomHandler</lang> |
||
Subroutines can be called as a command, without storing the output |
|||
<lang sensetalk> |
|||
MyCommand 1, "variable", (4, 5, 6) |
|||
to MyCommand args |
|||
... |
|||
end MyCommand |
|||
</lang> |
|||
Functions/subroutines can also be defined with the to, on or function keywords: |
|||
<lang sensetalk>to MyFn args |
|||
... |
|||
end MyFn |
|||
function MyFn args |
|||
... |
|||
end args |
|||
on MyFn args |
|||
... |
|||
end args |
|||
</lang> |
|||
=={{header|Sidef}}== |
=={{header|Sidef}}== |