Loadstring

From OpenEUO
Revision as of 18:51, 7 October 2010 by 76.184.213.234 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
local f , err = loadstring (string [, chunkname])

Similar to loadfile, but gets the chunk from the given string.

To load and run a given string, use the idiom

    assert(loadstring(s))()

or

   dostring(s)

When absent, chunkname defaults to the given string.

Dofile

Dostring

Loadfile