diff options
author | Judd <foldl@users.noreply.github.com> | 2022-09-08 23:33:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 17:33:29 +0200 |
commit | 918ae1691909d81a53b70a3d4d4f34f014ab5010 (patch) | |
tree | 5e0cdffe760338216de37c67adfb75e43b4c06e3 /doc | |
parent | 3ea8219d73b2aed53daa954627230eaa667394dc (diff) | |
download | Nim-918ae1691909d81a53b70a3d4d4f34f014ab5010.tar.gz |
Update manual.md (#20321)
* Update manual.md add explanation for $#. * Update manual.md add explanation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/manual.md b/doc/manual.md index 0be2e9edf..8d1440f4d 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -7855,8 +7855,9 @@ The `codegenDecl` pragma can be used to directly influence Nim's code generator. It receives a format string that determines how the variable or proc is declared in the generated code. -For variables, $1 in the format string represents the type of the variable -and $2 is the name of the variable. +For variables, $1 in the format string represents the type of the variable, +$2 is the name of the variable, and each appearance of $# represents $1/$2 +respectively according to its position. The following Nim code: @@ -7872,7 +7873,8 @@ will generate this C code: ``` For procedures, $1 is the return type of the procedure, $2 is the name of -the procedure, and $3 is the parameter list. +the procedure, $3 is the parameter list, and each appearance of $# represents +$1/$2/$3 respectively according to its position. The following nim code: |