equal =

Declaration

equal (item_1, item_2 : VARIANT): BOOLEAN

Description

Returns whether two variables are equal. If both variables can be treated as integers, they are compared as integers. Strings are compared without regard for case.

See Also

less_than
less_than_equal
greater_than
greater_than_equal
not_equal
math functions

Example

script test_math is
  -- for all of the equality functions, there are
  -- appropriate mathematical operators defined,
  -- though it is legal to use the function name
  if a = b then
    -- a and b are the same
  else
    if a > b then
      -- a is greater than b
    else
      if a < b then
        -- a is less than b
      end
    end
  end

  if a <= b then
    -- a is less than or equal to b
  else
    if a >= b then
      -- a is greater than or equal to b
    end
  end

  if a <> b then
    -- a is not equal to b
  end
end