Home>Article>Backend Development> what does mod mean in vb
What does mod mean in vb?
mod in vb means the remainder obtained by dividing the dividend by the divisor, which is called the modulo operator.
Syntax:MOD (Number1, Number2)
.
In the VB development environment, the modulo operation (mod) and the remainder (rem) operation are the same, because in most programming languages, the '%' symbol is used to represent the modulo or remainder operation. For example, 15 Mod 4 returns 3, and 12 Mod 2 returns 0. Enter help mod or doc mod in the VB command window to get help information for this function.
Extended information:
If Number1 or Number2 is a floating point value, the floating point remainder of the division operation will be returned. The resulting data type is the smallest data type that can hold all possible values obtained by dividing the data types of Number1 and Number2.
If Number1 or Number2 evaluates to Nothing, treat it as zero.
If Number2 is zero and Number1 is an integer, a DivideByZeroException exception is thrown. Returns NaN if Number1 is a floating point number.
The above is the detailed content of what does mod mean in vb. For more information, please follow other related articles on the PHP Chinese website!