[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Registering a new function that wraps write(format())
- From: Nick Trout <Nick.Trout@<a href="/cgi-bin/echo.cgi?warthog.co.uk">...</a>>
- Date: Thu, 21 Feb 2002 15:05:54 -0000
> >Is there an easy way of registering a new function that wraps
> >write(format()), but called somthing else like 'myprint' for
> example. I
> >guess I have to call 'format' with all the args, then pass
> the results to
> function printf(...)
> printf("Hello from Lua %s at %s\n",_VERSION,date())
function printf(format, ...)
(just slight error I think)
Bah! The number of times I wished for printf and didnt see how easily I
could do it!!
Going to have to put that on the wiki...