Syntax: Mod ( number; divisor )
numberAny expression that resolves to a numeric value.
divisorAny expression that resolves to a numeric value.
Data type returned: Number
Returns the remainder after number is divided by divisor.
Mod() is related to the Div() function; Div() returns the whole number portion of x divided by y, whereas Mod() returns the remainder.
There are many practical uses for the Mod() function. For instance, when x is an integer, Mod (x; 2) returns 0 if x is even, and 1 if x is odd. Mod (x; 1) returns just the decimal portion of a number.
Mod (7; 5)
Mod (-7; 5)
Mod (13; 3)
Mod (1.43; 1)
: FileMaker Specifications
FileMaker 8 Product Line
Specifications and Storage Limits
Field Types and Import/Export Formats
: Calculation Functions
Working with Calculations Primer
: Custom Functions
Custom Functions Primer
Useful Custom Functions
: Script Steps
Script Step Reference
: Quick Reference
FileMaker Error Codes
FileMaker Keyboard Shortcuts
FileMaker Network Ports
FileMaker Server Command Line Reference
FileMaker XML Reference
: Other Resources
Where to Go for More Information