Call a function: Difference between revisions
Content deleted Content added
m →{{header|Factor}}: change a few words for accuracy |
No edit summary |
||
Line 3,172:
% arguments are passed by value, however Matlab has delayed evaluation, such that a copy of large data structures are done only when an element is written to.
</lang>
=={{header|Nanoquery}}==
<lang nanoquery>// function with no arguments
no_args()
// function with fixed amount of arguments
three_args(a, b, c)
// nanoquery does not support optional, variable, or named arguments
// obtaining a return value
value = returns_value()
// checking if a function called "func" is user-defined
try
type(func)
println "func is user-defined"
catch
println "func is a built-in or doesn't exist"
end</lang>
=={{header|Nemerle}}==
|