fn: %=
[contents]

Contents

Syntax

The syntax for %= calls is:

f++:  
%=(params)

n++:  
@%=(params)

Description

%= is the modulo assignment function, it takes two parameters p1, p2, the first should be an integer variable and the second should be an integer, the function sets p1=p1modp2.

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

f++ example

Example of %= being used with f++:

  1. :=(int, a=5, b=3)
  2. %=(a, b)
  3. console(a)

n++ example

Example of %= being used with n++:

  1. @:=(int, a=5, b=3)
  2. @%=(a, b)
  3. @console(a)