Mendix 7 is no longer supported unless you have Extended Support. Mendix 7 documentation will remain available until July 2024.

To upgrade to a supported version, see Moving from Desktop Modeler Version 7 to Studio Pro 8.

Unary expressions

Last modified: June 29, 2022

A unary minus operator is used to convert a number from negative to positive or vice versa. Note: there is no unary plus.

1
-8

represents the negative value of ‘8’. When used with a variable that already has a negative value (let’s assume $myVariable has the integer value “-7”) the result is positive:

1
-$myVariable

returns:

1
7