lua-users home
lua-l archive

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


Lua 5.0
lua_dofile() lua_dobuffer() lua_dostring()
These can be overridden in Lua code by providing a function
named _ALERT

l_panic writes to stderr (happens on aborts)

debug.debug()
and the command line interpreter write to stdout

SO if you override print(), provide an _ALERT() function like

function _ALERT(s)
   io.stderr:write(s,'\n')
end

and RTM on 
io.output ([file]) and io.output ([file])

you have most bases covered





On Sat, 11 Sep 2004 15:10:38 +0200, Philippe Fremy <phil@freehackers.org> wrote:
> On Saturday 11 September 2004 14:57, David Burgess wrote:
> > Simply create your own global print function.
> >
> 
> That's the simple workaround indeed. Are there any other functions that
> might print something on stdout or stderr, which I should divert too ?
> 
>         Philippe
> 
> 
> 
> 
> --
> An open source OS for contactless Smart Cards
> http://www.jayacard.org - Jayacard
> 



-- 
db