Skip to content

Instantly share code, notes, and snippets.

Created December 5, 2013 01:06
Show Gist options
  • Save anonymous/7798509 to your computer and use it in GitHub Desktop.
Save anonymous/7798509 to your computer and use it in GitHub Desktop.
proc scanf(formatstr: cstring) {.importc: "scanf", varargs.}
var tst: int
scanf("%ld", addr(tst))
write(stdout, tst)
#error: conflicting types for 'scanf'
# N_NIMCALL(void, scanf)(NCSTRING formatstr, ...);
# ^
#note: in definition of macro 'N_NIMCALL'
# # define N_NIMCALL(rettype, name) rettype __fastcall name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment