fn: /=
[contents]

Contents

Syntax

The syntax for /= calls is:

f++:  
/=(params)

n++:  
@/=(params)

Description

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

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=150, b=10)
  2. /=(a, b, 5)
  3. console(a)

n++ example

Example of /= being used with n++:

  1. @:=(int, a=150, b=10)
  2. @/=(a, b, 5)
  3. @console(a)