math evaluation on runtime
Rene Zwanenburg
renezwanenburg at gmail.com
Tue Apr 8 13:31:51 PDT 2014
On Tuesday, 8 April 2014 at 20:18:43 UTC, Szabo Bogdan wrote:
> Hi,
>
> There is any way to evaluate simple math strings like this one:
> "(1 + 2) * 3" and pass the result?
>
>
> Thanks,
> Bogdan
Not built in, but Pegged has an example which does exactly that:
https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/arithmetic.d
More information about the Digitalmars-d-learn
mailing list