fn: ++
[contents]

Contents

Syntax

The syntax for ++ calls is:

f++:  
++param
++(params)

n++:  
@++param
@++(params)

Description

++ is the pre-increment operator, it takes a non-zero number of parameters that should all be number variables, increments each of them and returns the value of the first parameter before being incremented.

Note: It is typically faster to use exprtk for incrementing variables, especially with the post-loop code with for loops.

f++ example

Example of ++ being used with f++:

  1. int a=0, b=0
  2. console(++a)
  3. console(++(a, b))

n++ example

Example of ++ being used with n++:

  1. @int a=0, b=0
  2. @console(@++a)
  3. @console(@++(a, b))