<< Prev        Next >>

ID : 632

Mod Operator

Function

To perform division of 2 numeric values and return the remainder.

Syntax

number1 Mod number2

Guaranteed entry

number1
Designate integer type data.
number2
Designate integer type data.

Return value

Divide the formula number1 by the formula number2 and return the remainder by integer type data as the operation result.

Description

For the remainder operator, the formula number1 is divided by the formula number2 and the remainder is returned by integer type data as the operation result.

In the following expression, a value of variable aaa (operation result) is 1.

aaa = 19 Mod 6

In the following expression, a value of variable bbb (operation result) is 2.

bbb = 11 Mod 3

Attention

-

Example

-

ID : 632

<< Prev        Next >>