Difference between revisions of "Slimport"

From OpenEUO
Jump to: navigation, search
m (Created page with "== Calling Convention == Call sl.import(style) Args style is a string Results none == Usage Example == local sl = dofile(getinstalldir()..'/lib/simplelib.lua') sl.slimport(...")
 
m (Calling Convention)
Line 3: Line 3:
 
  sl.import(style)
 
  sl.import(style)
 
Args
 
Args
  style is a string
+
  style is a string, valid values include 'lower', 'upper', 'camel'
 
Results
 
Results
 
  none
 
  none

Revision as of 15:37, 1 November 2010

Calling Convention

Call

sl.import(style)

Args

style is a string, valid values include 'lower', 'upper', 'camel'

Results

none

Usage Example

local sl = dofile(getinstalldir()..'/lib/simplelib.lua')
sl.slimport('camel')
local t = {a=1,b=2,c=3}
print(KeyStr(t))
--> 'a,b,c'

Description

Imports all names (keys) defined in the simplelib interface into the global environment G_. Use is strongly discouraged as the library will no longer be able to catch errors in usage stemming from calling undefined, misspelled, or overwritten names.

Valid values for the string argument style include any of 'lower' (default naming convention), 'upper', or 'camel' (for CamelCase).

See Also