lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Mar 17, 2006, at 17:03, Alexander Gladysh wrote:

Silly example:

-- Should print 3.
interprete(make_vm()) 'add' '1 '2' 'prn'

setmetatable( _G, { __index = function( aTable, aKey ) return aKey end } )

local aString = "bla"
local doIt

doIt = function( aValue )
        print( "doIt", unpack( aValue ) )

        return doIt
end

doIt { a } { b } { c } { aString }

> doIt    a
> doIt    b
> doIt    c
> doIt    bla

Weirder and weirder 8^)

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/