ClassName (Object function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Syntax terms) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
{{Template:Object:ClassName syntax}} | {{Template:Object:ClassName syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table | <table> | ||
<tr><th>%string</th><td>The class name of the object referenced by <var>object</var>.</td></tr> | <tr><th>%string</th> | ||
<td>The class name of the object referenced by <var class="term">object</var>.</td></tr> | |||
<tr><th>object</th> | <tr><th>object</th> | ||
<td>Object object for which the class name is to be returned.</td></tr> | <td><var>Object</var> class object variable for which the class name is to be returned.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | <ul> | ||
Line 15: | Line 18: | ||
</ul> | </ul> | ||
==Examples== | ==Examples== | ||
The following displays the class of the object referenced by <var>Object</var> class variable %something:<p class="code">... | The following displays the class of the object referenced by <var>Object</var> class variable <var class="term">%something</var>:<p class="code">... | ||
%something is object object | %something is object object | ||
... | ... | ||
printText {~=%something:className} | printText {~=%something:className} | ||
</p> | </p> | ||
==See also== | ==See also== | ||
{{Template:Object:ClassName footer}} | {{Template:Object:ClassName footer}} |
Latest revision as of 19:17, 7 August 2014
Class name of object (Object class)
[Introduced in Sirius Mods 8.1]
This function returns the class name of the underlying object.
Syntax
%string = object:ClassName
Syntax terms
%string | The class name of the object referenced by object. |
---|---|
object | Object class object variable for which the class name is to be returned. |
Usage notes
- The class name returned is the class of the object variable assigned to the Object class object variable, not the outermost (highest level extension) class. For example, if a variable
%foo is object foo
is assigned to variable%obj is object object
, %obj:classname would returnFoo
, even if the underlying object was of class Foobar which extended Foo.
Examples
The following displays the class of the object referenced by Object class variable %something:
... %something is object object ... printText {~=%something:className}