User Tools

Site Tools


manual:Calculations

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
manual:Calculations [2018/05/16 23:14]
JMichaelTX Update Operators Table. Needs Fixes.
manual:Calculations [2018/05/16 23:21] (current)
JMichaelTX
Line 29: Line 29:
 | Shift Operators (`≪, ≫`) | shift a number left or right | | Shift Operators (`≪, ≫`) | shift a number left or right |
 | Arithmetic Operators\\   • Add (`+`)\\   • Subtract (`-`)\\   • Multiply (`*`)\\   • Divide (`/`) | A mathematical function that takes two operands and performs a calculation on them. | | Arithmetic Operators\\   • Add (`+`)\\   • Subtract (`-`)\\   • Multiply (`*`)\\   • Divide (`/`) | A mathematical function that takes two operands and performs a calculation on them. |
-| [Modulo](https://​en.wikipedia.org/​wiki/​Modulo_operation) (`i MOD n`) | The remainder of the division of i by n.\\ Both values (`i, n`) must be integer in Keyboard Maestro. ​ |+| [Modulo](https://​en.wikipedia.org/​wiki/​Modulo_operation) (`i MOD n`) | The remainder of the division of `i by n`.\\ Both values (`i, n`) must be an integer in Keyboard Maestro. ​ |
 | Power Operator (`^`) | exponentiation | | Power Operator (`^`) | exponentiation |
 | Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions | | Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions |
Line 48: Line 48:
 ===== Variables ===== ===== Variables =====
  
-Variables ​are used unadorned ​in numeric calculations.  Do not try to use tokens (like <del>%Variable%MyVar%</​del>​) in numeric calculation fields, just use MyVar by itself. The variable must contain a valid numeric value, or an expression (v8+) that evaluates to a valid numeric value. ​ So for example, if MyVar contains a text value of `2*3`, then the calculation `4*MyVar` will return 24.+In numeric calculation fields, Variable Names are used without the `%` that are used in text token fields.  Do not try to use tokens (like `%Variable%MyVar%`) in numeric calculation fields, just use MyVar by itself. The variable must contain a valid numeric value, or an expression (v8+) that evaluates to a valid numeric value. ​ So for example, if MyVar contains a text value of `2*3`, then the calculation `4*MyVar` will return 24.
  
 ===== Screen Coordinates ===== ===== Screen Coordinates =====
manual/Calculations.1526526871.txt.gz · Last modified: 2018/05/16 23:14 by JMichaelTX