User Tools

Site Tools


en:cachevariables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:cachevariables [2022/02/22 10:19] – [Value types] lineflyeren:cachevariables [2022/05/14 11:16] – Remove FIXMEs 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 135: Line 131:
 |''sin''/''cos''/''tan'' |-| calculates sinus/cosinus/tangens of given parameter | numeric parameter in degree(!)| - | ''sin(90)'' evaluates to ''1''| |''sin''/''cos''/''tan'' |-| calculates sinus/cosinus/tangens of given parameter | numeric parameter in degree(!)| - | ''sin(90)'' evaluates to ''1''|
 |''abs''|-| calculates absolute value | numeric parameter | - | ''abs(-34)'' evaluates to ''34''| |''abs''|-| calculates absolute value | numeric parameter | - | ''abs(-34)'' evaluates to ''34''|
-|''round''|-| rounds decimal values mathematically | value to round | optional: number of places to round to | ''round(4.65)'' evaluates to ''5'', ''round(4.65; 1)'' evaluates to ''4.7''|+|''round''|-| rounds decimal values mathematically | value to round | optional: number of places to round to | ''round(4.65)'' evaluates to ''5'', ''round(4.65;1)'' evaluates to ''4.7''|
 |''if''|-| evaluates conditions and returns conditional values | list of if-then-else-values. See previous section for details | - | ''if(3<4;5;6)'' evaluates to ''5''| |''if''|-| evaluates conditions and returns conditional values | list of if-then-else-values. See previous section for details | - | ''if(3<4;5;6)'' evaluates to ''5''|
 |''checksum''|''cs''| calculates checksum of given numeric value. Calculates lettervalue if given paramter is of type text | positive integer or text | - | ''checksum(345)'' evaluates to ''12''| |''checksum''|''cs''| calculates checksum of given numeric value. Calculates lettervalue if given paramter is of type text | positive integer or text | - | ''checksum(345)'' evaluates to ''12''|
Line 202: Line 198:
   * ''[0-3, ^1-2, 5]'' evaluates to a range containing ''0'', ''3'' and ''5''.   * ''[0-3, ^1-2, 5]'' evaluates to a range containing ''0'', ''3'' and ''5''.
  
-When a range is used in a context where only one value is allowed (this is the case in normal calculation), the first range value is used for calculation. For example, the expression ''[8, 0-9]'' will evalulate to ''0'' in a normal calculation context, while ''[8, 0-9]'' will evalulate to ''8''.+When a range is used in a context where only one value is allowed (this is the case in normal calculation), the first range value is used for calculation. For example, the expression ''[0-9]'' will evalulate to ''0'' in a normal calculation context, while ''[8, 0-9]'' will evalulate to ''8''.
  
 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:
Line 215: Line 211:
   * ''A*[4, 7]'': for ''A=3'' this evaluates to values ''12'' and ''21''   * ''A*[4, 7]'': for ''A=3'' this evaluates to values ''12'' and ''21''
   * ''[1-2]*[3-4]'': evaluates to ''3'', ''6'', ''4'' and ''8''.   * ''[1-2]*[3-4]'': evaluates to ''3'', ''6'', ''4'' and ''8''.
 +
 +
 +==== Comments ====
 +
 +You may enter comments into formula expressions using the ''#'' character. Comments end at next ''#'' or at end of expressions. Everything in a comment is ignored during evaluation. For example:
 +  * ''A * 5 # test comment'' for ''A=3'' evaluates to ''15''
 +  * ''3.14 # this is pi # * 2 # and this is two'' evaluates to ''6.28''
en/cachevariables.txt · Last modified: 2022/11/25 11:58 by lineflyer