Feature Proposal: Implement a CALCULATE macro as a registered macro
Motivation
I am implementing some macros in my plugin and I need to nest my macro and CALC macro outside a table. However, it gaves unexpected result because the CALC macro doesn't follow exactly left-to-right inside-to-outside rules.
Description and Documentation
I need to use the CALC outside a table, but I need the CALC to be expanded exactly as left-to-right inside-to-outside. The current CALC can't do it because it is handled through commonTagsHandler. If we can create a macro CALCULATE as registered macro, it will make sure we can nest it into other macros properly. TWiki already has this feature. It is not hard to implement, but don't know why it is commented out in Foswiki.
Examples
%<nop>CALCULATE{"$SET(options, $LISTITEM(2, ))"}%
%<nop>SESSION_VARIABLE{"myvalue" set="%<nop>CALCULATE{"$GET(options)"}%"}%
Currently use CALC macro for above statements in a single topic will cause unexpected result.
Impact
Implementation
--
Contributors: ChunHuang - 02 Jul 2013
Discussion
This has already been implemented on Foswiki/trunk. See
Tasks.Item8417.
--
MichaelDaum - 02 Jul 2013