[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Partial execution of Lua function from C/C++ program?
- From: Bob Smith <bob@...>
- Date: Tue, 24 Jun 2003 10:54:57 -0600 (MDT)
On Mon, 23 Jun 2003, Peter Shook wrote:
> Bob Smith wrote:
> > My result when calling a() would be "outa" when I would expect only "a"
> > Is this because I am using lua_dofile(...) then lua_getglobal(..., "a")
> > and finally a lua_pcall(...)
> Yes, that's all you need to do if you just want to call function 'a'
> lua_getglobal(L, "a");
> lua_pcall(L, 0, 0, 0);
> - Peter Shook
Yeah I get the result of the function but I also get the result of
everything else not inside the function. So if I had 10 io.write
statements outside functions, I would get those outputed as well as the
execution of the function. Is this an expected result?