... | @@ -4,7 +4,7 @@ GetDP uses three kinds of numeric variables: parser variables, run-time variable |
... | @@ -4,7 +4,7 @@ GetDP uses three kinds of numeric variables: parser variables, run-time variable |
|
|
|
|
|
Parser variables are created when the input `.pro` files are parsed, once at the beginning of a calculation. Such variables cannot be changed at run-time during a calculation, i.e. during pre-processing (`Constraint` evaluations), processing (`Resolution` operations) or post-processing (`PostOperation` operations). Parser variables are the most common in GetDP `.pro` files. They involve the least overhead at run-time, as their value is computed once, when the `.pro` file is read. They can be defined (almost) anywhere in `.pro` files, i.e. outside or inside objects like `Function` or `Resolution`.
|
|
Parser variables are created when the input `.pro` files are parsed, once at the beginning of a calculation. Such variables cannot be changed at run-time during a calculation, i.e. during pre-processing (`Constraint` evaluations), processing (`Resolution` operations) or post-processing (`PostOperation` operations). Parser variables are the most common in GetDP `.pro` files. They involve the least overhead at run-time, as their value is computed once, when the `.pro` file is read. They can be defined (almost) anywhere in `.pro` files, i.e. outside or inside objects like `Function` or `Resolution`.
|
|
|
|
|
|
In the following example `a`, `b` and `c` are parser variables; they can be used inside lists and strings like `d()` and `e` (which are also parser variables), or within functions like `f[]` (which will only be evaluated at run-time):
|
|
In the following example `a`, `b` and `c` are parser variables; they can be used to create lists and strings like `d()` and `e` (which are also parser variables), or within functions like `f[]` (which will only be evaluated at run-time):
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
a = 1;
|
|
a = 1;
|
... | | ... | |