Call a function: Difference between revisions

Content added Content deleted
m (→‎{{header|LFE}}: </cod> to </code>)
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 6,500: Line 6,500:
Here are some examples:
Here are some examples:


<syntaxhighlight lang="ecmascript">var f1 = Fn.new { System.print("Function 'f1' with no arguments called.") }
<syntaxhighlight lang="wren">var f1 = Fn.new { System.print("Function 'f1' with no arguments called.") }
var f2 = Fn.new { |a, b|
var f2 = Fn.new { |a, b|
System.print("Function 'f2' with 2 arguments called and passed %(a) & %(b).")
System.print("Function 'f2' with 2 arguments called and passed %(a) & %(b).")
Line 6,544: Line 6,544:
50
50
</pre>
</pre>

=={{header|XLISP}}==
=={{header|XLISP}}==
<syntaxhighlight lang="lisp">; call a function (procedure) with no arguments:
<syntaxhighlight lang="lisp">; call a function (procedure) with no arguments: