Difference between revisions of "Simple lib soliton"
From OpenEUO
m (→Description) |
m (→See Also) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Calling Convention == | == Calling Convention == | ||
Call | Call | ||
− | local sl = | + | local sl = simple_lib_soliton__() |
Args | Args | ||
ignored | ignored | ||
Line 9: | Line 9: | ||
== Usage Example == | == Usage Example == | ||
− | if type( | + | if type(simple_lib_soliton__) ~= 'function' then |
print('Forgot to initialize the library') | print('Forgot to initialize the library') | ||
end | end | ||
Line 15: | Line 15: | ||
== Description == | == Description == | ||
− | + | simple_lib_soliton__ is the only variable name defined by default in [[_G]] (or other calling environment) by simplelib. It acts as a guard value to keep the library from being initialized more than one time. There is no need to directly interact with this variable. Calling it returns the unique interface table of simplelib. | |
== See Also == | == See Also == | ||
+ | |||
+ | * [http://www.easyuo.com/openeuo/wiki/index.php/Simplelib simplelib] | ||
* [http://www.easyuo.com/openeuo/wiki/index.php/Including_simplelib_in_a_Project Including simplelib in a Project] | * [http://www.easyuo.com/openeuo/wiki/index.php/Including_simplelib_in_a_Project Including simplelib in a Project] |
Latest revision as of 08:28, 2 November 2010
Calling Convention
Call
local sl = simple_lib_soliton__()
Args
ignored
Results
sl is a table, the unique interface to simplelib
Usage Example
if type(simple_lib_soliton__) ~= 'function' then print('Forgot to initialize the library') end
Description
simple_lib_soliton__ is the only variable name defined by default in _G (or other calling environment) by simplelib. It acts as a guard value to keep the library from being initialized more than one time. There is no need to directly interact with this variable. Calling it returns the unique interface table of simplelib.