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:14] – [Numeric operators] 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 82: | 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 91: | Line 86: | ||
| ^ Operator ^ Function ^ Example ^ | ^ Operator ^ Function ^ Example ^ | ||
| - | |+|Addition|'' | + | |'' |
| - | |-|Subtraction (or negating a number)|'' | + | |'' |
| - | |*|Multiplication|'' | + | |'' |
| - | |/ | + | |'' |
| - | |%|Modulo|'' | + | |'' |
| - | |'' | + | |'' |
| - | |!|Factorize|'' | + | |'' |
| ==== Relational operators and conditions ==== | ==== Relational operators and conditions ==== | ||
| Line 114: | 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 132: | 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 145: | Line 141: | ||
| |'' | |'' | ||
| |'' | |'' | ||
| - | |||
| ==== Variables ==== | ==== Variables ==== | ||
| Line 186: | 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 ''#'' | ||
| + | * '' | ||
| + | * '' | ||