local temp = {
"(",
"10",
"+",
"5",
")",
"*",
"2"
}
print(table.concat(temp))
The code above outputs "(10+5)*2"
But i wonder if somehow i could make it do the math, so it outputs "30"?
Edited by pofferman, 05 September 2015 - 10:12 PM.
Posted 29 August 2015 - 05:28 PM
local temp = {
"(",
"10",
"+",
"5",
")",
"*",
"2"
}
print(table.concat(temp))
Edited by pofferman, 05 September 2015 - 10:12 PM.
Posted 29 August 2015 - 05:42 PM
print( loadstring( "return " .. table.concat( temp ) )() )
Posted 29 August 2015 - 06:02 PM
0 members, 1 guests, 0 anonymous users