abs

Declaration

abs (item: INTEGER): INTEGER

Description

Returns the positive of item.

See Also

add
divide
mod
multiply
negate
subtract
math functions

Example

script test_math is
  -- for most of the arithmetic functions, there are
  -- appropriate mathematical operators defined,
  -- though it is legal to use the function name
  a   :=   1
  b   :=   5
  a   :=   a + b -- a = 6
  a   :=   a - (b * a) -- a = -29
  a   :=   mod (abs (a), b)) -- a = 5
  a   :=   - (a / b) -- a = 1
end