Difference between revisions of "Variant"

m (0.11.0 -> 11.0)
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Value represents all of Lua type, but it's not that exists in Lua really.
+
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 [[Object]]s.
 +
 
 +
== Notes ==
 +
Foreign userdata (Lua's files, LuaSocket, ENet, ...), and functions are not supported.
 +
 
 +
Nested tables are not officially supported in versions prior to [[11.0]].
 +
 
 +
== See Also ==
 +
* [[parent::love]]
 +
[[Category:Types]]
 +
{{#set:Description=The types supported by [[love.thread]] and [[love.event]].}}
 +
{{#set:Since=000}}
  
In [[Thread]](or [[Channel]]), The value of the message can be a boolean, string, number, LÖVE userdata, or a simple flat table. Foreign userdata (Lua's files, LuaSocket, ENet, ...), functions, and tables inside tables are not supported.
 
 
== Other Languages ==
 
== Other Languages ==
{{i18n|value}}
+
{{i18n|Variant}}

Revision as of 14:16, 10 January 2019

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, ...), and functions are not supported.

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

See Also


Other Languages