lua-users home
lua-l archive

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


If you prepend "return " to the expression before executing it, it'll leave it 
on the stack. Of course, that'll cause problems if it isn't an expression.

Ben

On Friday 09 May 2003 09:43 pm, Mark Hamburg wrote:
> Is there an easy way to tell whether a string is an expression? I'm setting
> up a Lua shell and I'd like to be able to recognize expressions and print
> their results if entered as commands. The problem is that lua_loadBuffer
> generates a function that doesn't leave anything on the stack when
> executed.