Difference between revisions of "Object:type (Français)"

(Autres Langages)
(Printing the type of an object)
Line 14: Line 14:
 
== Examples ==
 
== Examples ==
  
=== Printing the type of an object ===
+
=== Affiche le type d'un objet ===
 
<source lang="lua">
 
<source lang="lua">
 
image = love.graphics.newImage("test.png")
 
image = love.graphics.newImage("test.png")

Revision as of 21:05, 10 August 2017

Retourne le type d'un objet comme une chaîne de caractère.

Fonction

Synopsis

type = Object:type()

Arguments

Aucun.

Returns

string type
Type de l'objet sous forme de chaîne de caractère.

Examples

Affiche le type d'un objet

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

Voir Aussi

Autres Langages