This template evaluates an expression sequence using Module:Wikilisp. Pass the expression sequence as the first unnamed template parameter; all parameters to the template are also passed to the the module. For example,

{{evalx|(get-substring (get-arg 2) 2 3)|abcd}}

would expand to


A different module, to use instead of Module:Wikilisp, may be specified by non-blank template parameter test-eval.


When Module:Wikilisp is #invoked directly, rather than through an intermediary template such as {{evalx}}, the module point of entry is Lua function rep, and the invocation parameters are accessible through Wikilisp functions get-arg and get-arg-expr. However, the intermediary template cannot explicitly pass its arbitrary template parameters to the invocation since it doesn't know their names in advance. To compensate, an alternative point of entry is provided through Lua function trep, that feeds get-arg and get-arg-expr the parameters to the intermediary template instead of the parameters to #invoke.

See alsoසංස්කරණය

"සැකිල්ල:Evalx/doc&oldid=12248" වෙතින් සම්ප්‍රවේශනය කෙරිණි