Nim/tests/tprocvar.nim
2008-06-23 01:37:49 +02:00

17 lines
203 B
Nim

# test variables of type proc
import
io
var
x: proc (a, b: int): int {.cdecl.}
proc ha(c, d: int): int {.cdecl.} =
echo(c + d)
result = c + d
x = ha
discard x(3, 4)
#OUT 7