Update manual.md (#20321)

* Update manual.md

add explanation for $#.

* Update manual.md

add explanation.
This commit is contained in:
Judd 2022-09-08 23:33:29 +08:00 • committed by GitHub
commit 918ae16919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: