[Mono-list] Javascript eval() function in c#

Kornél Pál kornelpal at hotmail.com
Tue Jun 7 16:17:15 EDT 2005


>This function evaluates mathematical expressions.  Currently it
>only does addition, subtraction, multiplication, division, and
>exponents, but can be easily extended.  It's meant to work like the
>Javascript eval() function.  Please let me know if you find it useful.

eval() is supported in .NET Framework implementation of JScript.NET but it
is not yet implemented in Mono.

eval() is intended to execute any valid JScript.NET code so it should use
the built in JScript.NET compiler instead of a separate interpreter
implementation.

But if your work is just a mathematical expression evaluator that targets
any language I think it is useful.

Kornél



More information about the Mono-list mailing list