mirror of
https://github.com/sigmasternchen/libparcival
synced 2025-03-15 03:48:55 +00:00
added note about side effects on pointer parameters to readme
This commit is contained in:
parent
9c82fd38c4
commit
e42686dc63
1 changed files with 4 additions and 2 deletions
|
@ -38,7 +38,7 @@ The parameter block has the following syntax:
|
|||
{$ [parameter list ] $}
|
||||
```
|
||||
|
||||
The parameter list is comma-seperated list of the parameters of the template including their type.
|
||||
The parameter list is comma-seperated list of the parameters of the template including their type.
|
||||
|
||||
Example:
|
||||
```
|
||||
|
@ -47,6 +47,8 @@ Example:
|
|||
|
||||
Note: All types that C does not provide by default have to be declared in a statement block in the meta section or in a header file included by a statement block in the meta section. In the example above this would apply to the type `user_t`.
|
||||
|
||||
Note: In case of pointer parameters they are not allowed to be modified in statement or output blocks. If the template has side effects like that, the behavior might be undefined (because of the calculation of the the output size).
|
||||
|
||||
### Statement Block
|
||||
|
||||
Statement blocks have the following syntax:
|
||||
|
@ -86,7 +88,7 @@ Output blocks have the following syntax:
|
|||
{{ [format string] {, format parameters} }}
|
||||
```
|
||||
|
||||
These blocks are effectively `printf()`-calls. In the rendered templated they will be replaced by the corresponding output.
|
||||
These blocks are effectively `printf()`-calls. In the rendered templated they will be replaced by the corresponding output.
|
||||
|
||||
Example:
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue