Skip to content

Commit 918ae16

Browse files
authored
Update manual.md (#20321)
* Update manual.md add explanation for $#. * Update manual.md add explanation.
1 parent 3ea8219 commit 918ae16

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/manual.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7855,8 +7855,9 @@ The `codegenDecl` pragma can be used to directly influence Nim's code
78557855
generator. It receives a format string that determines how the variable
78567856
or proc is declared in the generated code.
78577857

7858-
For variables, $1 in the format string represents the type of the variable
7859-
and $2 is the name of the variable.
7858+
For variables, $1 in the format string represents the type of the variable,
7859+
$2 is the name of the variable, and each appearance of $# represents $1/$2
7860+
respectively according to its position.
78607861

78617862
The following Nim code:
78627863

@@ -7872,7 +7873,8 @@ will generate this C code:
78727873
```
78737874

78747875
For procedures, $1 is the return type of the procedure, $2 is the name of
7875-
the procedure, and $3 is the parameter list.
7876+
the procedure, $3 is the parameter list, and each appearance of $# represents
7877+
$1/$2/$3 respectively according to its position.
78767878

78777879
The following nim code:
78787880

0 commit comments

Comments
 (0)