Initial import
This commit is contained in:
commit
405b86068e
324 changed files with 163599 additions and 0 deletions
17
tests/tprocvar.nim
Executable file
17
tests/tprocvar.nim
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
# 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue