OPERATOR:  Mod

Implemented in version 1.0
 
Mod
 
The Mod operator divides two numbers and returns the remainder.
 
In the example, 5 divides into 26, 5 times, with a remainder of 1.
 
Code:
<% remainder = 26 Mod 5 %>
 
Output:
1
 
Note that for floating-point numbers, the numbers to the right of the decimal are rounded to the nearest integer (i.e., in the example, 5.7176 is treated as 6 by Mod).
 
Code:
<% remainder = 26.1234 Mod 5.7176 %>
 
Output:
2


Copyright 1999-2004 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information