fn: +
[contents]

Contents

Syntax

The syntax for + calls is:

f++:  
+(params)

n++:  
@+(params)

Description

+ is the arithmetic operator for addition, it takes a non-zero number of input parameters, if all parameters are numbers it returns their sum, otherwise it returns their string concatenation.

Note: It is typically faster to use exprtk for arithmetic operators, plus the syntax is nicer.

f++ example

Example of + being used with f++:

  1. :=(int, a=10, b=13, c=15)
  2. :=(string, str="hello")
  3. console(+(a, b))
  4. console(+(a, b, c))
  5. console(+(str, ", ", "world!"))

n++ example

Example of + being used with n++:

  1. @:=(int, a=10, b=13, c=15)
  2. @:=(string, str="hello")
  3. @console(@+(a, b))
  4. @console(@+(a, b, c))
  5. @console(@+(str, ", ", "world!"))