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
Last revisionBoth sides next revision
en:cachevariables [2022/02/27 18:49] – add comments eddiemucen:cachevariables [2022/11/25 11:53] – [Functions] Add TRUNC function 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 95: Line 91:
 |''/''|Division|''12/3'' evaluates to ''4''| |''/''|Division|''12/3'' evaluates to ''4''|
 |''%''|Modulo|''12%5'' evaluates to ''2''| |''%''|Modulo|''12%5'' evaluates to ''2''|
-|''^''|Potentiate|''3^3'' evaluates to ''9''|+|''^''|Potentiate|''3^3'' evaluates to ''27''|
 |''!''|Factorize|''4!'' evaluates to ''24''| |''!''|Factorize|''4!'' evaluates to ''24''|
  
Line 113: Line 109:
 * Else the fifth parameter is returned * Else the fifth parameter is returned
  
-For example ''if(A==5;50;A==4;40;30)'' will evaluate to ''50'' if ''A=50'', to ''40'' if ''A=4'' and to ''30'' for any other value of ''A''.+For example ''if(A==5;50;A==4;40;30)'' will evaluate to ''50'' if ''A=5'', to ''40'' if ''A=4'' and to ''30'' for any other value of ''A''.
  
 ^ Operator ^ Meaning ^ Example ^ ^ Operator ^ Meaning ^ Example ^
Line 131: Line 127:
 The following functions are defined: The following functions are defined:
  
-^ Function ^ Synonyms ^ Description ^ Parameter1 ^ Parameter 2 ^ Example ^+^ Function ^ Synonyms ^ Description ^ Parameter 1 ^ Parameter 2 ^ Example ^
 |''sqrt''|-|calculates square root of given parameter|numeric parameter| - |''sqrt(9)'' evaluates to ''3''| |''sqrt''|-|calculates square root of given parameter|numeric parameter| - |''sqrt(9)'' evaluates to ''3''|
 |''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''|
 +|''trunc''|-| Truncates decimal values to the (optional) provided number of places | value to truncate | optional: Number of places to remain after truncation (default:0) | ''trunc(123.456)'' evaluates to ''123'', ''trunc(123.456;2)'' evaluates to ''123.45'' |
 |''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 144: Line 141:
 |''roman''|-| scans a given string value as a roman number and returns its decimal value | string | - | ''roman('VI')'' evaluates to ''6''.| |''roman''|-| scans a given string value as a roman number and returns its decimal value | string | - | ''roman('VI')'' evaluates to ''6''.|
 |''vanity''|''vanitycode'', ''vc''| returns the vanity code of a string | string | - | ''vanity('cgeo')'' evaluates to ''2436''.| |''vanity''|''vanitycode'', ''vc''| returns the vanity code of a string | string | - | ''vanity('cgeo')'' evaluates to ''2436''.|
- 
  
 ==== Variables ==== ==== Variables ====
en/cachevariables.txt · Last modified: 2022/11/25 11:58 by lineflyer