Re: Evaluating expressions, not statements?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Evaluating expressions, not statements?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 5 Apr 2001 14:35:05 -0300 (EST)
>Is there a way to evaluate a Lua expression in the form of a string? There
>only seems to be dostring() which will give an error if you pass it
>something like "2+3*5".
Try dostring"return 2+3*5"
Or
function eval_string (str)
return dostring ("return "..str)
end
--lhf