[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Partial execution of Lua function from C/C++ program?
- From: RLake@...
- Date: Tue, 24 Jun 2003 12:22:54 -0500
> 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?
When you execute dofile, it does the file. If the file contains executable
statements, it executes them. If the executed statement outputs something,
that gets output. Why would this not be an expected result? (Note that the
"out" was written *before* you called a.)