This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:cachevariables [2022/02/22 10:10] – [Variable section] lineflyer | en:cachevariables [2022/11/25 11:58] (current) – [Range expressions] New syntax for range expressions lineflyer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **FIXME** This will be used to describe the new tab on cache details used for cache variables. | ||
- | |||
- | **FIXME** We could add a chapter with some practical How-To examples (e.g. typical lettervalue case) | ||
- | |||
====== Cache Variables ====== | ====== Cache Variables ====== | ||
Line 38: | Line 34: | ||
^ Button ^ Action ^ | ^ Button ^ Action ^ | ||
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
|{{: | |{{: | ||
Line 55: | Line 51: | ||
The syntax will be explained in detail in the following sub-chapters. | The syntax will be explained in detail in the following sub-chapters. | ||
- | However as a quick overview | + | However as a quick overview about what is supported, you will find a list of examples here: |
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
* '' | * '' | ||
* '' | * '' | ||
Line 68: | Line 68: | ||
* '' | * '' | ||
- | **FIXME** Add wordvalue to examples | ||
- | **FIXME** Aren't some of the examples to complex (or might need interim steps written down) to understand? | + | |
==== Value types ==== | ==== Value types ==== | ||
Line 79: | Line 78: | ||
|Integer | Number without decimal places | Use digits | '' | |Integer | Number without decimal places | Use digits | '' | ||
|Decimal | Number with decimal places | Use digits with decimal point or comma | '' | |Decimal | Number with decimal places | Use digits with decimal point or comma | '' | ||
- | |String | Text | Surround value with '' | + | |String | Text | Surround value with '' |
- | **FIXME** using monotext does not work for ' in this table as its also part of the monotext syntax in Dokuwiki. :( | ||
==== Numeric operators ==== | ==== Numeric operators ==== | ||
Line 88: | Line 86: | ||
^ Operator ^ Function ^ Example ^ | ^ Operator ^ Function ^ Example ^ | ||
- | |+|Addition|'' | + | |'' |
- | |-|Subtraction (or negating a number)|'' | + | |'' |
- | |*|Multiplication|'' | + | |'' |
- | |/ | + | |'' |
- | |%|Modulo|'' | + | |'' |
- | |**FIXME**|Potentiate|'' | + | |'' |
- | |!|Factorize|'' | + | |'' |
==== Relational operators and conditions ==== | ==== Relational operators and conditions ==== | ||
Line 111: | Line 109: | ||
* Else the fifth parameter is returned | * Else the fifth parameter is returned | ||
- | For example '' | + | For example '' |
^ Operator ^ Meaning ^ Example ^ | ^ Operator ^ Meaning ^ Example ^ | ||
Line 129: | Line 127: | ||
The following functions are defined: | The following functions are defined: | ||
- | ^ Function ^ Synonyms ^ Description ^ Parameter1 | + | ^ Function ^ Synonyms ^ Description ^ Parameter 1 ^ Parameter 2 ^ Example ^ |
|'' | |'' | ||
|'' | |'' | ||
|'' | |'' | ||
- | |'' | + | |'' |
+ | |'' | ||
|'' | |'' | ||
|'' | |'' | ||
Line 142: | Line 141: | ||
|'' | |'' | ||
|'' | |'' | ||
- | |||
==== Variables ==== | ==== Variables ==== | ||
Line 183: | Line 181: | ||
* The Formula '' | * The Formula '' | ||
* The Formula '' | * The Formula '' | ||
- | * The Formula '' | + | * The Formula '' |
- | * The Formula '' | + | * The Formula '' |
- | **FIXME** Double underscore is interpreted as underline by Dokuwiki | ||
==== Range expressions ==== | ==== Range expressions ==== | ||
- | You can specify ranges in formulas using '' | + | You can specify ranges in formulas using '' |
- | An example for a range expression is '' | + | **FIXME** Link to anchor on waypoint calc page as soon as its updated to cover waypoint generation with ranges. |
+ | |||
+ | An example for a range expression is '' | ||
You may specify consecutive values using '','' | You may specify consecutive values using '','' | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | When a range is used in a context where only one value is allowed (this is the case in normal calculation), | + | When a range is used in a context where only one value is allowed (this is the case in normal calculation), |
Ranges currently support only positive constant integer values. A range must always be evaluate to at least 1 value and a range may not evaluate to more than 20 values. For example the following ranges are invalid: | Ranges currently support only positive constant integer values. A range must always be evaluate to at least 1 value and a range may not evaluate to more than 20 values. For example the following ranges are invalid: | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
A formula may include one or more range definitions mixed with normal other formula parts. For example the following formulas are valid: | A formula may include one or more range definitions mixed with normal other formula parts. For example the following formulas are valid: | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
+ | |||
+ | |||
+ | ==== Comments ==== | ||
+ | |||
+ | You may enter comments into formula expressions using the ''#'' | ||
+ | * '' | ||
+ | * '' |