lua-users home
lua-l archive

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


> 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.)