[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How do I eval a string and get its results on the stack?
- From: Sam Roberts <sroberts@...>
- Date: Fri, 7 Apr 2006 13:10:42 -0700
On Fri, Apr 07, 2006 at 03:51:26PM -0300, Luiz Henrique de Figueiredo wrote:
> > I would like to be able to do in C:
> >
> > Lua_EvalString(lua, "two()");
> >
> > and then see 2 on the top of the lua stack.
>
> Try
> Lua_EvalString(lua, "return two()");
Thanks, I'm so used to every expression resulting in a value, that never
occurred to me, works wonderfully.
Sam