fn: %=
[contents]

Contents

Syntax

The syntax for %= calls is:

f++:  
%=(params)

n++:  
@%=(params)

Description

%= is the modulo assignment function, it takes two parameters $p_1$, $p_2$, the first should be an integer variable and the second should be an integer, the function sets $p_1 = p_1 \mod p_2$.

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++:

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

n++ example

Example of %= being used with n++:

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