JademusSreg

Complex types and equality from natives.galaxy

May 14th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.80 KB | None | 0 0
  1. // -- Complex types and equality --
  2. //
  3. // Normally, comparing two "complex" objects with the == or != operators will only compare the
  4. // object reference, not the contained object data.  However, a few types will compare the contained
  5. // data instead.  These types are:
  6. //
  7. //      abilcmd, point, string, unitfilter, unitref
  8. //
  9. // Examples:
  10. //
  11. //      Point(1, 2) == Point(1, 2)                              // True
  12. //      "test string" == "test string"                          // True (note: this is case sensitive)
  13. //      AbilityCommand("move", 0) == AbilityCommand("move", 0)  // True
  14. //      Order(abilCmd) == Order(abilCmd)                        // False (two different order instances)
  15. //      RegionEmpty() == RegionEmpty()                          // False (two different region instances)
Advertisement
Add Comment
Please, Sign In to add comment