[REBOL] Re: Evaluating a maths expression in a string?
From: larry:ecotope at: 29-Dec-2000 10:48
Hi Mat> The question is, if I get a string which contains a mathematical > expression - how would you evaluate this and get the result?Here is one way:>> str: "3 + 4"== "3 + 4">> either not error? try[result: do str][result]["code to handle error"]== 7>>HTH -Larry