Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











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-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information