Mod
mod
returns the remainder of the division of one number by another.
mod(EXP_NUM1,EXP_NUM2)
# Is the Integer MY_INTEGER even or odd?If mod(MY_INTEGER,2)=0# MY_INTEGER is evenElse# MY_INTEGER is oddEndif# Mod can be used with decimal valuesY = mod(1.1, 0.3)Y = 0.2
mod(X,Y)
returns:
Local Decimal MY_DECIMAL MY_DECIMAL = mod(3.7,2) # Type assigned is decimal and value = 1.7Local Integer MY_INTEGERMY_INTEGER = mod(3.7,2) # Type assigned is integer and value = 1
Error code | Description |
---|---|
10 | At least one of the arguments is not numeric. |
fix.