Difference between revisions of "Variant"

(Notes: - Mention nil as an unsupported type.)
m (Notes: Added note on table values)
Line 8: Line 8:
  
 
Nested tables are not officially supported in versions prior to [[11.0]].
 
Nested tables are not officially supported in versions prior to [[11.0]].
 +
 +
Values within a table are also subject to the Variant rules (i.e. must only contain Variant types).
  
 
== See Also ==
 
== See Also ==

Revision as of 23:50, 8 June 2023

The Variant type is not a real lua type, but instead indicates what lua values LÖVE can store internally. It is used in love.thread and love.event. Indeed, as it is a "virtual" type, it has no specific representation in lua, and no methods.

Types

A Variant can be a table, a boolean, a string, a number or LÖVE Objects.

Notes

Foreign userdata (Lua's files, LuaSocket, ENet, ...), functions and nil are not supported.

Nested tables are not officially supported in versions prior to 11.0.

Values within a table are also subject to the Variant rules (i.e. must only contain Variant types).

See Also


Other Languages