proc printf(formatstr: cstring) {.header: "<stdio.h>", varargs.} proc printf(formatstr: cstring) {.importc: "printf", varargs, header: "<stdio.h>".}
if there is no "importc: "printf"" in the pragma, so the procedure's name has to "printf". On the contrary, you can free named the procedure's name. For example:
proc printf(formatstr: cstring) {.header: "<stdio.h>", varargs.}
proc printf2(formatstr: cstring) {.header: "<stdio.h>",
importc: "printf", varargs.}
var x = 3
printf("%d", x)
printf2("\n%d", x+1)