%=

From Microduino Wiki
Jump to: navigation, search

%=(Compound modulo)


*Description
The arithmetic operator used among variables and constants. "%=" is a way of abbreviation.


*Syntax

x %= y;   //  It is equal to x = x % y;


*Parameters
x: Variable in non floating-point.
y: Variable or constant in non floating-point.


*For example

x = 9;
x %= 4;      // x = 1

*Note
The modulus operator cannot be used for floating-point data.

[Return to Arduino Syntax Manual]