%= Assignment Operator

Purpose

Take modulus of the first operand specified by the value of the second operand; store the result in the object specified by the first operand.

Syntax

i %= j
i : avar
j : avar

Description

Using this operator is almost the same as specifying result = result % expression, except that result is only evaluated once.

Example

Global l As Long

l = 42

l %= 5        // l = 42 Mod 5

Print l       // Prints  2

See Also

%, FMod, Mod, Mod(), Mod8, Mod8(), Operator Hierarchy

{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}