EvaluatePlugin

This JSPWiki plugin evaluates numerical expressions with or without parameters. The usage would be like this: a

[[{Evaluate expr='2*x + y - 42' x='16' y='13' showExpr='true' showVars='true'}]

And the result would be:

2*x + y - 42 = 3.0 (x=16.0, y=13.0)

If the showExpr parameter is missing or false, the result would just be

3.0

If the showVars parameter is missing or false, the result would be

2*x + y - 42 = 3.0

Parameters names can be 'a' through 'z'.

The source code is here . It needs the ExprJava class (where the expression syntax and the available functions are explained further). A jar file containing all my JSPWiki plugins is here .

Plugin Author: Ulf Dittmer

ContributedPlugins

Note that this plugin uses the pre-2.11 API. It will be updated in Q2 2024 to use the new API so it's compatible with the latest JSPWiki versions.