REMAINDER Function

The REMAINDER function divides the first number value you specify by the second number value you specify and returns the remainder. 

If the divisor is zero, Author generates a divide by zero error (NaN = Not a Number).

This function is one of Author's Mathematical Functions and Operators, which are useful for performing various calculations.

Function name REMAINDER
Usage model REMAINDER ( dividend:NUM, divisor:NUM ) 
Parameter This function requires you to replace two parameters:

dividend: NUM

The function divides this value by the value of divisor: NUM.

divisor: NUM

The function divides the value of dividend: NUM by this value.
Result A number value.

Example

In the following example, the number variable nu2 is divided by 2 in order to find out whether it is even or odd:

IF ( REMAINDER(nu2, 2) = 0 )

SET EvenTF TO TRUE

ELSE 

SET EvenTF TO FALSE

END IF

Download

After you download the example template, you can import the template to any workspace to see this example code in action.