Operator + (Add)

Adds two numbers together, giving you the sum

Usage

left_value + right_value

Parameters

left_value

(Required) Value to add

right_value

(Required) Value to add

Examples

Example With these variables Result

price + 10

price is 9.5

19.5

price1 + price2 + price3

price1 is 4.3
price2 is 6.2
price3 is 10.5

21

5 + 10 * 2

(None)

25

(5 + 10) * 2

(None)

30

5 + 10 / 2

(None)

10

(5 + 10) / 2

(None)

7.5

More information

Multiple operators can be used. The order of operation is the same as in mathematics:

  • content of parentheses is evaluated first
  • then exponents are evaluated, from right to left
  • then multiplication and division are evaluated, from left to right
  • the remaining operators are then applied from left to right

Reminders

A text containing digits is not handled as a number. To have an actual number:

  • use the @NUMBER_QUESTION to set the variable
  • write a numeric value directly in the code without quotes, ex: age >= 18
  • use a function which converts to a number: NUMBER(text_containing_numbers)
  • use a function which returns a number: FIND("world", "hello everybody")

See also