MOD

From QB64 Wiki
Revision as of 05:10, 28 August 2009 by 72.95.147.221 (talk) (Created page with ''''MOD''' is Integer remainder division. Also called Modulus. ''Syntax:'' Numerator MOD Divisor MOD returns 0 if a number is evenly divisible by Integer division (\). MOD retur…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MOD is Integer remainder division. Also called Modulus.

Syntax: Numerator MOD Divisor

MOD returns 0 if a number is evenly divisible by Integer division (\). MOD returns 0 if the numerator is 0. The divisor should never be 0!

Example: a% = 100 MOD 9

Result: a% = 1