Difference between revisions of "var.list"
Jump to navigation
Jump to search
Jimbauwens (talk | contribs) (Created page with "var.'''list''' is a function that is part of the Var Library. <br> The function returns a table with all the names of variables currently defined in the document.<br> ...") |
Jimbauwens (talk | contribs) |
||
Line 9: | Line 9: | ||
var.'''list()'''<br> returns a table with variable with variable names. | var.'''list()'''<br> returns a table with variable with variable names. | ||
− | + | <h2> Example </h2> | |
− | + | <p><span class="fck_mw_source" _fck_mw_customtag="true" _fck_mw_tagname="source" lang="lua">fckLRfunction on.paint(gc)fckLR variables = var.list()fckLR for i=1, table.getn(variables) dofckLR gc:drawString(variables[i], 10, 10*i-10, "top")fckLR endfckLRendfckLR</span> | |
− | + | </p><p>This code retrieves the variable names and then prints them on the screen. | |
− | + | </p> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | This code retrieves the variable names and then prints them on the screen. | ||
== See also == | == See also == |
Revision as of 13:07, 1 June 2011
var.list is a function that is part of the Var Library.
The function returns a table with all the names of variables currently defined in the document.
Syntax
var.list()
returns a table with variable with variable names.
Example
fckLRfunction on.paint(gc)fckLR variables = var.list()fckLR for i=1, table.getn(variables) dofckLR gc:drawString(variables[i], 10, 10*i-10, "top")fckLR endfckLRendfckLR
This code retrieves the variable names and then prints them on the screen.