abs

Gives the absolute value of a number (its value without the sign).

Runs on: either side: the compiler places the statement that calls it where the values it uses live.

Format:

abs(number)

Parameters:

Parameter Type Description
number number the number

Returned Value:

Type Description
number the number without its sign

Examples

difference = abs(expected - actual)