f(a,b,...) | Ada, Awk, Awk, B, C, C#, C++, Dylan, E, Eiffel, Erlang, Java, JavaScript, Lua, Maple, Matlab, Mercury, merd, Modula-3, Pascal, Perl, Perl6, PHP, Pike, Prolog, Python, Ruby, XPath, YCP, Yorick |
f a b ... | BourneShell, Haskell, Logo, Matlab, MSH, OCaml, Pliant, Rebol, SML, Tcl |
f(a,b,...f) or f[a,b,...] depending on the version | BCPL |
(f a b ...) (apply f l) | Common Lisp, Emacs Lisp, Scheme |
(funcall f a b ...) | Common Lisp, Emacs Lisp |
{f a b} | Oz |
f[a,b,...] or f.call(a,b,...) | Ruby |
&$f(a,b,...) or $f->(a,b,...) | Perl |
$f.(a,b,...) | Perl6 |
f a, b, ... | Perl |
f, a, b, ... | Yorick |
v = f(a, b, ...) or call f a, b, ... | Classic REXX |
a b ... f | Forth, PostScript |
a f | Smalltalk |
a f: b g: ... | Smalltalk |
(a,b,...)->&f or (a,b,...)->f | Beta |
f:a | FL |
.. [ f, A, B, ...] | Prolog |
<xsl:call-template name="f"> <xsl:with-param name="a" select=a/> <xsl:with-param name="b" select=b/> </xsl:call-template> |
XSLT |
with no parameter
f | Ada, BourneShell, Eiffel, Haskell, Logo, Matlab, Mercury, MSH, Pascal, Perl, Perl6, Pliant, PostScript, Prolog, Rebol, Ruby, Tcl |
f() | Awk, C, C#, C++, E, Erlang, Java, JavaScript, Lua, Maple, merd, OCaml, Perl, Pike, Python, SML, YCP |
(f) | Common Lisp, Emacs Lisp, Scheme |
(funcall f) | Common Lisp, Emacs Lisp |
{f} | Oz |
f[] or f.call | Ruby |
&$f or $f->() | Perl |
$f.() | Perl6 |
v = f() | Classic REXX |
call f | Classic REXX, Fortran |
f value | Smalltalk |
<xsl:call-template name="f">/ | XSLT |
give the first argument
f a | Haskell, OCaml, SML |
f(a) | Mercury |
f(a,) | merd |
&f.assuming(var_name => a) | Perl6 |
functools.partial(f, a) | Python |
give the second argument
f(,b) | merd |
&f.assuming(b => b) | Perl6 |
give the first argument to operator ">"
(a >) | Haskell, merd |
(>) a | OCaml |
give the second argument to operator ">"
(> a) | Haskell, merd |
sub f { ... } | Perl, Perl6 |
sub f($para1, $para2, ...) { ... } | Perl6 |
def f(para1, para2, ...): ... | Python |
def f(para1, para2, ...) ... end | Ruby |
def f(para1, para2, ...) ... { ... } | E |
f para1 para2 = ... | Haskell |
let f para1 para2 = ... | OCaml |
f(para1, para2, ...) = valof $( ... $) | BCPL |
f(para1, para2, ...) = ... | merd |
f ... or f: para1 ... | Smalltalk |
f: func [para1 para2 ...] ... | Rebol |
/f { ... } def | PostScript |
f := (para1, para2, ...) -> ... | Maple |
func f(a, b, c...) { ... } | Yorick |
typ0 f(typ1 para1, typ2 para2, ...) { ... } | C, C#, C++, Pike, YCP |
function f(para1, para2) { ... } | Awk, JavaScript |
function f(para1, para2) ... code ... end | Lua |
function f { ... } | KornShell |
function f { param(para1, [typ2]para2, ...) ... } | MSH |
(define (f para1 para2) ...) | Scheme |
(defun f (para1 para2) ...) | Common Lisp, Emacs Lisp |
fun { F Para1 Para2 } ... end | Oz |
proc f {para1 para2} { ... } | Tcl |
function retval = f(para1, para2) retval = ... |
Matlab |
:- func f(typ1, typ2, ...) = typ0. f(Para1, Para2, ...) = ... |
Mercury |
function f(para1 : type1; para2 : typ2; ...) return retval is begin ... end f; |
Ada |
function f para1 para2 -> retval arg typ1 para1; arg typ2 para2; arg rettyp retval; ... |
Pliant |
function f(para1 : typ1, para2 : typ2, ...) : retval; var retval : typ0; begin ... end |
Pascal |
f (para1 : typ1; para2, para3 : typ2; ...) : rettyp is do ... end |
Eiffel |
<xsl:template name="f"> <xsl:param name="para1"/> <xsl:param name="para2"/> ... </xsl:template> |
XSLT |
Function f(para1, para2) ... End Function | Visual Basic |
: f ... ; | Forth |
f() { ... } | BourneShell |
f : procedure ... return retval |
Classic REXX |
to f :para1 :para2 ... end |
Logo |
procedures
procedure f(para1 : typ1, para2 : typ2); begin ... end |
Pascal |
f (para1 : typ1; para2, para3 : typ2; ...) is do ... end |
Eiffel |
procedure f(para1 : typ1; para2 : MODE type2; ...) is begin ... end f; MODE ::= | OUT | IN OUT |
Ada |
void f(typ1 para1, typ2 para2, ...) { ... } | C, C#, C++, Pike |
let f(para1, para2, ...) be $( ... $) | BCPL |
proc { F Para1 Para2 } ... end | Oz |
f := proc(para1, para2, ...) ... end proc | Maple |
Sub f(para1, para2) ... End Sub | Visual Basic |
function f(para1, para2) ... |
Matlab |
f : procedure ... return |
Classic REXX |
predicates
f(Para1, Para2, ....) :- ... . | Prolog |
sub { my ($a, $b) = @_; ... } | Perl |
{ my ($a, $b) = @_; ... } | Perl |
{ ... } (arguments are in the stack | PostScript |
[ ... ] | Logo |
{ param(para1, [typ2]para2, ...) ... } | MSH |
{|a, b| ... } | Ruby |
[:a :b| ... ] | Smalltalk |
lambda a, b: ... | Python |
lambda(typ1 para1, typ2, para2, ...) { ... }; | Pike |
(a, b) => ... | C#3 |
(a, b) -> ... | Maple |
a, b -> ... | merd |
-> $a, $b { ... } | Perl6 |
\a b -> ... | Haskell |
fn (a, b) => ... | SML |
fun a b -> ... | OCaml |
(func(A, B) = C :- ...) | Mercury |
function(a, b) ... | JavaScript |
function(a, b) ... end | Lua |
fun(a, b) -> ... end | Erlang |
fun {$ A B} ... end | Oz |
func [a b ...] ... | Rebol |
def _(para1, para2, ...) ... { ... } | E |
proc {|a, b| ...} | Ruby |
lambda {|a, b| ...} | Ruby |
(lambda (a b) ...) | Common Lisp, Emacs Lisp, Scheme |
inline('...x...y...') | Matlab |
method(a, b) ... end method | Dylan |
create_function(',','...') | PHP |
delegate(ta a, tb b) { ... } | C#2 |
breaks the control flow
return | Ada, Awk, B, BCPL, BourneShell, C, C#, C++, Classic REXX, Common Lisp, E, Java, JavaScript, Lua, Maple, Matlab, Perl, Perl6, PHP, Pike, Pliant, Python, Rebol, Ruby, Tcl, YCP, Yorick |
Return | Visual Basic |
RETURN | Modula-3 |
resultis | BCPL |
return from xxx | Common Lisp |
^ | Smalltalk |
Exit Function / Exit Sub | Visual Basic |
output | Logo |
function body is the result
no syntax needed | Common Lisp, Dylan, Emacs Lisp, Erlang, Haskell, Maple, Matlab, OCaml, Oz, Perl, Perl6, Rebol, Ruby, Scheme, SML |
setting the result
Result := val | Eiffel |
<function name> = val | Visual Basic |
<function name> := val | Pascal |
<retvar name> = val; | Matlab |
AUTOLOAD | Perl |
AUTOSCALAR, AUTOMETH, AUTOLOAD... | Perl6 |
__getattr__ | Python |
method_missing | Ruby |
doesNotUnderstand | Smalltalk |
unknown | Tcl |
no-applicable-method | Common Lisp |
doesNotRecognizeSelector | Objective-C |
match [name, args] { ... } | E |
the predicate fail | Prolog |
caller | Perl, Perl6, Ruby |
inspect.stack()[1] | Python |
backtrace | Pike |
trace 'I' | Classic REXX |
evalin('caller', expression) | Matlab |
current_predicate | Prolog |
where(2) | Maple |
. | Haskell |
~ | merd |
o | SML |
@ | Maple |
compose | Dylan |
id | Haskell |
identity | Common Lisp |
yourself | Smalltalk |