Welcome to my ASP Code Website

Mod Remainder ASP Function



The mod function is rarely used in asp, but what it does is provide the remainder value in a division situation.

If you don't remember your basic math, the remainder is what is left over after you do a division problem. For example:

20 / 5 = 4, remainder 0

18 / 5 = 3, remainder 3

10 / 3 = 3, remainder 1

The format in ASP to get that remainder is

Remain = val1 mod val2

so if you wanted to find the remainder of 10 / 3, you would say

remain = 10 mod 3

or

val1 = 10
val2 = 3

remain = val1 mod val2

Numeric / Math ASP Functions