%=

From Microduino Wiki
Revision as of 04:05, 17 August 2016 by Fengfeng (talk) (Created page with "%=(Compound modulo) '''*Description'''<br> The arithmetic operator used among variables and constants. "%=" is a way of abbreviation. '''*Syntax'''<br> <pre style="co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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]