Futurebasic/Language/Reference/mod

From Wikibooks, open books for an open world
< Futurebasic | Language | Reference
Jump to: navigation, search

Contents

[edit] MOD

[edit] Syntax

remainder = expr MOD modulus

[edit] Description

The MOD operator subtracts from ABS(expr) the largest multiple of ABS(modulus) which is less than or equal to ABS(expr), and returns the result as remainder. If expr is negative, then a negative result is returned in remainder.

Note that if expr and modulus are both integers, the result of MOD is just the remainder of the integer division operation expr / modulus.

[edit] See Also

Appendix D: Numeric Expressions

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export