Guest User

lib.nim

a guest
Oct 23rd, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.23 KB | None | 0 0
  1. {.pragma: rtl, exportc, dynlib, cdecl.}
  2.  
  3. type
  4.   toCallProc = proc(): string
  5.  
  6. var toCall: toCallProc
  7.  
  8. proc setup*(test: toCallProc) {.rtl.} =
  9.   echo "Hello from lib"
  10.   toCall = test
  11.  
  12. proc call*() {.rtl.} =
  13.  echo toCall()
Add Comment
Please, Sign In to add comment