书栈网 · BookStack 本次搜索耗时 0.016 秒,为您找到 650 个相关结果.
  • Debug示例

    Debug示例 Debug示例 以下示例实现了一个强大的 debug 命令,该命令接受可变数量的参数: # 使用Nim语法树,我们需要一个在``macros``模块中定义的API: import macros   macro debug ( args : varargs [ untyped ]): untyped = # `a...
  • Custom annotations

    528 2020-10-18 《Nim v1.4 Manual》
    Custom annotations Custom annotations It is possible to define custom typed pragmas. Custom pragmas do not effect code generation directly, but their presence can be detected ...
  • For语句

    For语句 For语句 for 语句是一个循环遍历迭代器提供的任何元素的构造。示例使用内置的 countup 迭代器: echo "Counting to ten: " for i in countup ( 1 , 10 ): echo i # --> Outputs 1 2 3 4 5 6 7 8 9 10 on diff...
  • ImportCpp pragma

    1028 2020-10-18 《Nim v1.4 Manual》
    ImportCpp pragma Namespaces Importcpp for enums Importcpp for procs @ is a special case to support a cnew operation. It is required so that the call expression is inlined direc...
  • ImportCpp pragma

    130 2024-07-11 《Nim v2.0 Manual》
    ImportCpp pragma Namespaces Importcpp for enums Importcpp for procs @ is a special case to support a cnew operation. It is required so that the call expression is inlined direc...
  • Var return type

    83 2024-07-11 《Nim v2.0 Manual》
    Var return type Future directions Var return type A proc, converter, or iterator may return a var type which means that the returned value is an l-value and can be modified by...
  • 方法

    方法 方法 过程总是静态派发,而方法则使用动态派发。为了将动态派发应用在对象上,对象必须是引用类型。 type Expression = ref object of RootObj ## 表达式的抽象基类 Literal = ref object of Expression x :...
  • NRVO

    426 2020-10-18 《Nim v1.4 Manual》
    NRVO NRVO Note : This section describes the current implementation. This part of the language specification will be changed. See https://github.com/nim-lang/RFCs/issues/230 f...
  • 字符字面值

    字符字面值 字符字面值 字符字面值用单引号 '' 括起来,并且可以包含与字符串相同的转义序列 - 有一个例外:平台依赖的 newline (\p ) 是不允许的,因为它可能比一个字符宽(通常是CR / LF对)。 以下是对字符字面值有效的 转义序列 : 转义序列 含义 \r , \c 回车 \n , \l 换行 \f 换页 \t 制表符 ...
  • marshal

    Basic usage See also Imports Procs Source Edit This module contains procs for serialization and deserialization of arbitrary Nim data structures. The serialization form...