Difference between revisions of "Object:type"

(Undo revision 12106 by Gim (talk))
(Undo revision 12105 by Gim (talk))
Line 1: Line 1:
Zwraca typ obiektu jako [[string (Polski)|string]]
+
Gets the type of the object as a string.
  
== Funkcja ==
+
== Function ==
=== Sygnatura ===
+
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
 
type = Object:type()
 
type = Object:type()
 
</source>
 
</source>
=== Argumenty ===
+
=== Arguments ===
Brak.
+
None.
=== Wartość zwracana ===
+
=== Returns ===
{{param|string (Polski)|type|nazwa typu obiektu.}}
+
{{param|string|type|The type as a string.}}
== Przykłady ==
+
== Examples ==
Wypisuje nazwy typów różnych obiektów.
+
=== Printing the type of an object ===
 
<source lang="lua">
 
<source lang="lua">
 
image = love.graphics.newImage("test.png")
 
image = love.graphics.newImage("test.png")
print(image:type()) -- wypisze: Image
+
print(image:type()) -- outputs: Image
 
source = love.audio.newSource("test.ogg")
 
source = love.audio.newSource("test.ogg")
print(source:type()) -- wypisze: Source
+
print(source:type()) -- outputs: Source
 
</source>
 
</source>
 
+
== See Also ==
== Zobacz również ==
+
* [[parent::Object]]
* [[parent::Object (Polski)]]
+
{{#set:Description=Gets the type of the object as a string.}}
 
 
== Inne języki ==
 
{{i18n|Object:type}}
 
 
 
{{#set:Description=Zwraca nazwę typu obiektu.}}
 
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
== Other Languages ==
 +
{{i18n|Object:type}}

Revision as of 19:12, 11 December 2013

Gets the type of the object as a string.

Function

Synopsis

type = Object:type()

Arguments

None.

Returns

string type
The type as a string.

Examples

Printing the type of an object

image = love.graphics.newImage("test.png")
print(image:type()) -- outputs: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- outputs: Source

See Also

Other Languages