Operations - Macros

Far Manager

Operations

You can use the following operations on the variables:

Operation Description
+ Numeric addition or string concatenation
- Numeric subtraction or unary negation
* Numeric multiplication
/ Numeric division. FAR interrupts macro execution if division by 0 occurs.
& Bitwise AND
^ Bitwise XOR
| Bitwise OR
<< Logical left shift
>> Logical right shift
! Logical NOT
~ Bitwise NOT

Operator precedence:

Operation Description
! ~ - Unary (R->L)
* / Arithmetic
+ - Arithmetic
<< >> Logical shift
< <= > => Logical comparison
== != Logical comparison
& Bitwise (and)
^ Bitwise (xor)
| Bitwise (or)
&& Logical
|| Logical

Notes

  1. Named keys (e.g. CtrlK) can be present in any expressions; in this case they are treated as numbers.
  2. It is impossible to use macro-language elements while recording a macro in a usual way. Macro-language elements can be added to the sequence only by editing the registry manually or by using special applications or FAR plugins.