-
Notifications
You must be signed in to change notification settings - Fork 3
Functions
Franco Montenegro edited this page Apr 17, 2016
·
2 revisions
public function foo takes nothing returns nothing
call TimerStart(CreateTimer(), 5.00, true, function
call BJDebugMsg("I'm and anonymous function!")
endfunction)
endfunction
public function foo returns nothing
// ...
endfunction
public function foo takes integer i
// ...
endfunction
public function foo
// ...
endfunction
Functions are going to be sorted automatically depending on the usage, so:
function foo ...
// ...
endfunction
function bar
call foo()
endfunction
Is going to be translated to
function bar
call foo()
endfunction
function foo ...
// ...
endfunction
It also works for mutual recursion.