Imports Types Procs Templates Source Edit This module contains Nim’s support for locks and condition vars. Imports syslocks Types Cond = SysCond Nim condi...
used 编译提示 used 编译提示 当一个符号既未导出也未被使用时,Nim 会输出一条警告消息。给这个符号加上 used 编译提示可以抑制这条消息。 当通过宏生成符号时,这个编译提示非常有用: template implementArithOps ( T ) = proc echoAdd ( a , b : T ) {. ...
Discard statement Discard statement Example: proc p ( x , y : int ): int = result = x + y discard p ( 3 , 4 ) # discard the return value of `p` The d...
CodegenDecl pragma CodegenDecl pragma The codegenDecl pragma can be used to directly influence Nim’s code generator. It receives a format string that determines how the variabl...