lua-users home
lua-l archive

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


Yes, using that with lua_dostring will work for me.  Thats wonderfull,
thankyou very much!

Chris Percival
Software Engineer
Interaxis Computing Ltd.
DDI:  +44 (0)1249 700072
http://www.interaxis.co.uk/

> -----Original Message-----
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Luiz Henrique de
> Figueiredo
> Sent: 21 February 2002 14:59
> To: Multiple recipients of list
> Subject: Re: Registering a new function that wraps write(format())
>
>
> >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
> >'write'.
>
> function printf(...)
>  write(call(format,arg))
> end
>
> printf("Hello from Lua %s at %s\n",_VERSION,date())
>
> --lhf