lua-users home
lua-l archive

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



On Tuesday, May 22, 2001, at 02:29 PM, Eric Ries wrote:

Well, that is what I do now as a kind of kludge. But that is not exactly
right, unless lua can handle constructs like:

return if foo then
return a
else
return b
end

But surely, if this is a feature that is helpful, we can do better...

In that case, would this do the job?

function eval(s)
  return dostring("local f = function () "..s.." end; return f()")
end

Steve