MODS Function

Divides the elements in one dynamic array by those in another, calculating the remainders.

Syntax

MODS(dynArray1, dynArray2)

Syntax Elements

dynArray1, dynArray2
DataBasic expressions that evaluate to dynamic arrays.

Return Value

A dynamic array formed by combining dynArray1 and dynArray2. Each element contains the remainder of dividing the element in dynArray1 by the corresponding element in dynArray2.

Note

  • Missing or null elements in dynArray1 are treated as 0.

  • Missing or null elements in dynArray2 are treated as 1.

  • Non-numeric elements are treated as 0.

  • If an element in dynArray2 evaluates to 0, a run-time error is generated and the result is 0.

Operation

The remainder is calculated using the formula A - (INT(A/B) * B).

Example

ARY1 = 5:@AM:27:@AM:128
ARY2 = 2:@AM:10:@AM:64
NEWARY = MODS(ARY1, ARY2)

Sets NEWARY to "1AM7AM0".