Extern pragma
Like exportc or importc, the extern pragma affects name mangling. The string literal passed to extern can be a format string:
proc p(s: string) {.extern: "prefix$1".} =
echo s
In the example, the external name of p is set to prefixp. Only $1 is available and a literal dollar sign must be written as $$.
当前内容版权归 nim-lang.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 nim-lang.org .