mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
12 lines
275 B
Text
12 lines
275 B
Text
|
|
// `sum` should be called either:
|
||
|
|
//
|
||
|
|
// - a function: `sum(...)` for compile-time errors
|
||
|
|
// - a funcref: `@sum.call(...)` for run-time errors
|
||
|
|
// - an expression: `(@sum)(...)` for run-time errors
|
||
|
|
//
|
||
|
|
print( ( sum )( 1, 2 ) );
|
||
|
|
|
||
|
|
function sum( a, b )
|
||
|
|
return a + b;
|
||
|
|
endfunction
|