Type conversions Type conversions Syntactically a type conversion is like a procedure call, but a type name replaces the procedure name. A type conversion is always safe in the...
Modules Modules Nim supports splitting a program into pieces by a module concept. Each module needs to be in its own file and has its own namespace. Modules enable information ...
Identifier equality Identifier equality Two identifiers are considered equal if the following algorithm returns true: proc sameIdentifier ( a , b : string ): bool = ...
Procs Source Edit This module provides some high performance string operations. Experimental API, subject to change. Procs proc add ( x : var string ; y : openAr...
Discard语句 Discard语句 Example: proc p ( x , y : int ): int = result = x + y discard p ( 3 , 4 ) # 丢弃 `p` 的返回值 discard 语句评估其表达式的副作用并将表达式的结果值丢弃,其应在已知忽略此值...
Type Classes Type Classes A type class is a special pseudo-type that can be used to match against types in the context of overload resolution or the is operator. Nim supports ...