lua-users home
lua-l archive

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


> > local originalPrint = print
> > print = function(...)
> > 	io.write(...)
> > 	io.write("\n")
> > end
> > 
> > Or something like that?
> 
> No, because io.write does not do automatic conversion to string.

Fair enough. Ignore my incorrect replacement for the print function.
PA's solution looks better.
At least we all agree that replacing the print function is the way to go
:-)

To be honest though, the only time in the past that I have had to change
the way print works was on a platform for which there was no stdout. In
that case I changed the C implementation so that print wrote to a log
file. 

- DC