Navigation menu

WoW:Common Lua shortcuts: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
Line 7: Line 7:
For instance:
For instance:
  MySVTable = MySVTable or {};
  MySVTable = MySVTable or {};
  print(UnitExists("target") and "You have a target" or "You don't have a target")); -- As a trigraph
  print(UnitExists("target") and "You have a target" or "You don't have a target"); -- As a trigraph


A notable limitation of using short-cut evaluation as a trigraph operator is that if the ''true'' expression may return a false value, the false expression will be returned:
A notable limitation of using short-cut evaluation as a trigraph operator is that if the ''true'' expression may return a false value, the false expression will be returned:
Anonymous user