Number Functions

This section describes the following number functions.

inc
dec
dec
div
mod

inc

inc(<number>, <number>)

inc returns the sum of two numbers. inc may appear when defining datasource fields or in validations.

Example:

inc(2, 3) # 5 

dec

dec(<number>, <number>)

dec subtracts the second argument from the first. dec may appear when defining datasource fields or in validations.

Example:

dec(10, 2) # 8 

prod

prod(<number>, <number>)

prod returns the product of two numbers. prod may appear when defining datasource fields or in validations.

Example:

prod(2, 4) # 8 

div

div(<number>, <number>)

div divides the first argument by the second. div may appear when defining datasource fields or in validations.

Example:

div(10, 2) # 5 

mod

mod(<number>, <number>)

mod takes a modulus of the first number by the second. mod may appear when defining datasource fields or in validations.

Example:

mod(10, 3) # 1