SID-02021: Issue with older version of SpreadSheetPlugin
| Status: |
Answered |
TWiki version: |
5.1.0 |
Perl version: |
|
| Category: |
SpreadSheetPlugin |
Server OS: |
|
Last update: |
10 years ago |
Hi,
For reasons beyond my control I am stuck on an older version of TWiki (5.1.0). I would like to use some of the functionality of the
SpreadSheetPlugin however the version I have access to doesn't seem to include the CALCULATE function, only CALC.
The issue I have is that I can't use any previously defined variables in CALC. I can't think of a better way to explain it, so here's a code fragment that reproduces what I'm seeing:
<verbatim>
- Set VARA = %CALC{$EVAL(1+1)}%
- Set VARB = %CALC{$EVAL(%VARA% * %VARA%)}%
%VARB%
</verbatim>
I would expect this to set VARB to be equal to 4, but what I actually get is
<verbatim>
$EVAL(%CALC{2 * 2 )}%
</verbatim>
Can anyone help me get the desired result?
--
TWiki Guest - 2015-02-10
Discussion and Answer
CALC is not evaluated in the normal inside-out, left-to-right evaluation order. CALCULATE is. Your example will only work with CALCULATE. You can upgrade just the
SpreadSheetPlugin in your TWiki-5.1.0 installation.
--
Peter Thoeny - 2015-02-11
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
Peter Thoeny - 2015-12-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.