I suggest that eval() be re-implemented entirely to allow for math evaluation only, but created from the ground up by lummox jr, and if not then lummox jr jr.
example:
world << eval("5+4+8+[src.x]")
ID:2478549
Jun 19 2019, 5:47 pm
|
|||||||
| |||||||
I know after seeing the title the first response would be something along the lines of "dan code".
I suggest that eval() be re-implemented entirely to allow for math evaluation only, but created from the ground up by lummox jr, and if not then lummox jr jr. example: world << eval("5+4+8+[src.x]") |
Jun 19 2019, 6:11 pm
|
|
To be fair, it works for math evaluation right now. The code you posted will work properly.
|
It works with a lot of other stuff too, but it also doesn't work with a lot of stuff. (as noted by the workaround to make the subtraction operator work below)
mob |
In response to Optimumtact
|
|
Optimumtact wrote:
just write a tiny parser var s = "6 - -3" Can anyone actually make eval() subtract a negative number? lol |