JExpressionEvaluatorObj



Rob Salgado (salgado@physics.syr.edu)
Tav Hawkins (taviare@physics.syr.edu)
v.990729 (BUGS FIXED! FOR REAL, THIS TIME! [We hope...])

(The computational engine for this external module was based on Laptev Eugene's (ztv@imp.kiev.ua) Fast Expression Evaluator , who has graciously allowed us to use his source code.)


By default,
the module has



By the changing the module's properties, we can change the module so that it has

[Warning: before you connect the RealObj to the output, set that RealObj to have more than 3 digits and more than 1 floating-point place to see more decimal places.]


By supplying a string (say, using a LabelObj) to our module,
we can change the expression. Here, we purposely typed a syntactically-incorrect expression.

Upon a syntax error,
the module turns RED and trips the ERROR_FLAG, as indicated by an LEDObj connected to it. This indicates that the output is not reliable.


Upon an illegal value error,
the module turns YELLOW and trips the ERROR_FLAG, as indicated by an LEDObj connected to it. This indicates that the output is not reliable.


WARNING WARNING WARNING
use PARENTHESES to avoid confusion!

An expression like "-z^2" is evaluated as "(-z)^2" ... not "-(z^2)".

Laptev Eugene's (ztv@imp.kiev.ua) Fast Expression Evaluator uses the following order-of-operations.

From his documentation:

Operators are handled in the following priority:
1) Unary (+) and (-) signs.
2) "To the power of" symbol: (^).
3) Times (*), divide (/) and modulus (%).
4) Plus (+) and minus (-).
Unfortunately, this is different from the standard convention used in C and C++.

If I have time, I'll try to fix this. For now, use PARENTHESES to avoid confusion!


To use our binary:

Consult Laptev Eugene's documentation for help with the syntax.

To build your own binary:


Have fun!

Back to the NeatTools page