negate -

Declaration

negate (item: INTEGER): INTEGER

Description

Returns the negative of item.

See Also

abs
add
divide
mod
multiply
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 + 1)) -- a = 5
  a := - (a / b) -- a = 1
end