fn: -=
[contents]

Contents

Syntax

The syntax for -= calls is:

f++:  
-=(params)

n++:  
@-=(params)

Description

-= is the arithmetic assignment operator for subtraction, it takes n2 input parameters p1,,pn where p1 should be a variable name and the remainder should all be numbers, it sets p1=p2pn performed from left to right. For example, =(p1,p2,p3,p4)p1=p2p3p4=(p2p3)p4.

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

f++ example

Example of -= being used with f++:

  1. :=(int, a=13, b=10)
  2. -=(a, b, 8)
  3. console(a)

n++ example

Example of -= being used with n++:

  1. @:=(int, a=13, b=10)
  2. @-=(a, b, 8)
  3. @console(a)