This plugin adds spreadsheet capabilities to TWiki topics. Functions such as %CALCULATE{$INT(7/3)}% are evaluated at page view time. They can be placed in table cells and outside of tables. In other words, this plugin provides general function evaluation capability, not just classic spreadsheet functions. The plugin currently has
123 functions.
This plugin handles the %CALC{...}% and %CALCULATE{...}% variables. Embedded formulas are evaluated as follows:
Built-in function are of format $FUNCNAME(parameters)
Functions may be nested, such as %CALC{$SUM( R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0) )}%
Functions are evaluated from left to right, and from inside to outside if nested
A function parameter can be text, a mathematical formula, a cell address, or a range of cell addresses
Multiple parameters form a list; they are separated by a comma, followed by optional space, such as %CALCULATE{$SUM( 3, 5, 7 )}%
A parameter representing a string can optionally be enclosed in triple quotes; quotes are required if the string contains commas, parenthesis or newlines, such as %CALCULATE{$SUBSTITUTE('''Good, early morning''', morning, day)}%
The %CALCULATE{...}% variable may span multiple lines, which is useful to indent nested functions. In case the variable contains newlines, all white space around functions and function parameters is removed. Sample nested formula: %CALCULATE{ $LISTJOIN( $n, $LISTEACH( | $index | $item |, one, two, three ) ) }%
A table cell can be addressed as R1:C1. Table address matrix:
R1:C1
R1:C2
R1:C3
R1:C4
R2:C1
R2:C2
R2:C3
R2:C4
A table cell range is defined by two cell addresses separated by "..", e.g. "row 1 through 20, column 3" is: R1:C3..R20:C3
Lists can refer to values and/or table cell ranges, such as %CALC{$SUM( 3, 5, $T(R1:C7), R1:C11..R1:C15 )}%
Functions can only reference cells in the current or preceding row of the current table; they may not reference cells below the current table row
Functions can also be placed outside of tables; they can reference cells in the preceding table
Plain text can be added, such as %CALC{Total: $SUM($ABOVE()) kg}%
Use CALC or CALCULATE
Use %CALC{...}%in table cells: The CALC variable handles all functions, but it gets handled with delay compared to other TWikiVariables: It gets executed after internal variables and plugin variables that use the register tag handler. You may get unexpected results if you nest CALC inside other variables (such as %INCLUDE{%CALC{...}%}%) because it does not get evaluated inside-out & left-to-right like ordinary TWiki variables.
Use %CALCULATE{...}%outside tables: The CALCULATE variable is handled inside-out & left-to-right like ordinary TWiki variables, but it does not support functions that refer to table cells, such as $LEFT() or $T().
Built-in Spreadsheet Plugin Functions
The plugin currently has 123 functions. Convention for parameters:
Required parameters are indicated in ( bold )
Optional parameters are indicated in ( bold italic )
ABOVE( ) -- address range of cells above the current cell
Syntax: $ABOVE( )
Example: %CALC{$SUM($ABOVE())}% returns the sum of cells above the current cell
ADDLIST( name, list ) -- append a list to a list variable
Specify the variable name (alphanumeric characters and underscores) and the list to add. If the named list does not exist it will be created. Useful in a FormattedSearch to add items to a list. This function returns no output. Use $GETLIST() to retrieve a list variable.
Syntax: $ADDLIST( name, list )
Example: %CALCULATE{$SETLIST(nums, 0, 1, 2, 3)}% sets the nums variable to 0, 1, 2, 3 %CALCULATE{$ADDLIST(nums, 4, 5, 6, 7)}% adds 4, 5, 6, 7 to the nums variable %CALCULATE{$GETLIST(nums)}% returns 0, 1, 2, 3, 4, 5, 6, 7
Example formatted search: format="$percntCALCULATE{$ADDLIST(topics, $topic)}$percnt" in each search hit, adds the topic name to the topics list variable
EVAL( formula ) -- evaluate a simple mathematical formula
Addition, substraction, multiplication, division and modulus of numbers are supported. Any nesting is permitted
Numbers may be decimal integers (1234), binary integers (0b1110011), octal integers (01234), hexadecimal integers (0x1234) or of exponential notation (12.34e-56)
Execute a spreadsheet formula, typically retrieved from a variable. This can be used to store a formula in a variable once and execute it many times using different parameters.
Syntax: $EXEC( formula )
Example: %CALCULATE{$SET(msg, $NOEXEC(Hi $GET(name)))}% sets the msg variable with raw formula Hi $GET(name)
Example: %CALCULATE{$SET(name, Tom) $EXEC($GET(msg))}% executes content of msg variable and returns Hi Tom
Example: %CALCULATE{$SET(name, Jerry) $EXEC($GET(msg))}% returns Hi Jerry
FILTER( expression, text ) -- filter out characters from text
Remove characters from a text string. The filter is applied multiple times.
The expression can be a sequence of characters or a RegularExpression. Use tokens in the expression if needed: $comma for comma, $sp for space. The text may contain commas.
Syntax: $FILTER( chars, text )
Example: %CALCULATE{$FILTER(f, fluffy)}% returns luy - filter out a character multiple times
Example: %CALCULATE{$FILTER(an Franc, San Francisco)}% returns Sisco - cut a string
Example: %CALCULATE{$FILTER($sp, Cat and Mouse)}% returns CatandMouse - remove all spaces
Example: %CALCULATE{$FILTER([^0-9], Project-ID-1234)}% returns 1234 - filter in digits, e.g. keep only digits
Example: %CALCULATE{$FILTER([^a-zA-Z0-9 ], Stupid mistake*%@^! Fixed)}% returns Stupid mistake Fixed - keep only alphanumeric characters and spaces
Example: %CALCULATE{$FILTER([^a-zA-Z0-9], $PROPER(an EXELLENT idea.))}% returns AnExcellentIdea - turn a string into a WikiWord topic name
FIND( string, text, start ) -- find one string within another string
Finds one text string, within another text, and returns the number of the starting position of string, from the first character of text. This search is case sensitive and is not a regular expression search; use $SEARCH() for regular expression searching. Starting position is 1; a 0 is returned if nothing is matched.
Specify the variable name (alphanumeric characters and underscores). An empty string is returned if the variable does not exist. Use $SET() to set a variable first. Unlike table ranges, variables live for the time of the page view and persist across tables, i.e. you can use it to summarize results across several tables.
Syntax: $GET( name )
Example: %CALCULATE{$GET(my_total)}% returns the value of the my_total variable
GETHASH( name, key ) -- get the value of a previously set hash key
Specify the hash name and key; allowed characters for the hash name are alphanumeric characters, underscores and period. An empty string is returned if the hash key does not exist. Use $SETHASH() or $LIST2HASH() to set a hash. If the key is omitted, a list of all keys of the named hash is returned. If no parameters are specified, a list of all hash names is returned.
Syntax: $GETHASH( name, key )
Examples: %CALCULATE{$SETHASH(age, Jane, 26)}% %CALCULATE{$SETHASH(age, Tim, 27)}% %CALCULATE{$GETHASH(age, Jane)}% returns 26 %CALCULATE{$GETHASH(age)}% returns Jane, Tim %CALCULATE{$GETHASH()}% returns age
GETLIST( name ) -- get the list from a list variable
Specify the variable name (alphanumeric characters and underscores). An empty list is returned if the variable does not exist. Use $SETLIST() or $ADDLIST() to set a variable.
Syntax: $GETLIST( name )
Example: %CALCULATE{$GETLIST(nums)}% returns the value of the nums variable
HASH2LIST( name, format ) -- convert a hash to a list
Specify the hash name and optionally the format of a key/value pair. Default format is $key$comma $value, e.g. key & value in list format; $key indicates the key, $comma a comma, and $value the value. Keep in mind that you will get unexpected results if keys or values contain commas. Use $SETHASH() or $LIST2HASH() to set a hash.
Syntax: $HASH2LIST( name, format )
Examples: %CALCULATE{$LIST2HASH(age, Jane, 26, Tim, 27)}% %CALCULATE{$HASH2LIST(age)}% returns Jane, 26, Tim, 27 %CALCULATE{$HASH2LIST(age, $key is $value)}% returns Jane is 26, Tim is 27 %CALCULATE{$HASH2LIST(age, $key)}% returns Jane, Tim %CALCULATE{$HASH2LIST(age, $value)}% returns 26, 27
HASHEACH( formula, name ) -- evaluate and update each hash element
Specify a formula that is applied to each named hash element. In the formula, $key indicates the key, $value the value, and $index the index of the sorted key list, starting at 1. If $value is omitted, the item is appended to the formula. This function returns no output.
Syntax: $HASHEACH( formula, name )
Example: %CALCULATE{$LIST2HASH(age, Jane, 26, Tim, 27)}% %CALCULATE{$HASHEACH($INT($value + 2), age)}% adds 2 years to each person %CALCULATE{$HASH2LIST(age, $key is now $value)}% returns Jane is now 28, Tim is now 29
All keys of a hash become values, and vice versa. Hash keys are always unique, e.g. multiple identical values will be reduced to one key. This function returns no output.
Syntax: $HASHREVERSE( name )
Examples: %CALCULATE{$LIST2HASH(age, Jane, 26, Tim, 27, Sam, 27)}% %CALCULATE{$HASHREVERSE(age)}% reverses the hash and returns nothing %CALCULATE{$HASH2LIST(age, $key: $value)}% returns 26: Jane, 27: Tim
IF( condition, then, else ) -- return a value based on a condition
The condition can be a number (where 0 means condition not met), or two numbers with a comparison operator < (less than), <= (less than or equal), == (equal), != (not equal), >= (greater than or equal), > (greater than).
Syntax: $IF( condition, value if true, value if 0 )
Example: %CALC{$IF($T(R1:C5) > 1000, Over Budget, OK)}% returns Over Budget if value in R1:C5 is over 1000, OK if not
Example: %CALC{$IF($EXACT($T(R1:C2),), empty, $T(R1:C2))}% returns the content of R1:C2 or empty if empty
INT( formula ) -- evaluate formula and return integer truncated towards 0
Addition, substraction, multiplication, division and modulus of numbers are supported. Any nesting is permitted
Numbers may be decimal integers (1234), binary integers (0b1110011), octal integers (01234), hexadecimal integers (0x1234) or of exponential notation (12.34e-56)
If you expect a single decimal integer value with leading zeros, use $INT( $VALUE( number ) )
LIST2HASH( name, list ) -- create a hash from a list
Specify the hash name and a list. The list is expected to have a sequence of key and value pairs. If a key already exists its value is updated with the new value. The last key is ignored if the list has an uneven number of elements. Use $GETHASH() or $HASH2LIST to retrieve hash values.
Syntax: $LIST2HASH( name, list )
Example: %CALCULATE{$LIST2HASH(age, Jane, 26, Tim, 27)}% sets key Jane of hash named age to 26, and key Tim to 27
LISTEACH( formula, list ) -- evaluate and update each element of a list
Specify a formula that should be applied to list element; $item indicates the element, $index the index of the list, starting at 1. If $item is omitted, the item is appended to the formula. This function returns no output.
LISTJOIN( separator, list ) -- convert a list into a string
By default, list items are separated by a comma and a space. Use this function to indicate a specific separator string, which may include $comma for comma, $n for newline, $sp for space, and $empty to join a list without a separator.
Syntax: $LISTJOIN( separator, list )
Example: %CALCULATE{$LISTJOIN($n, Apple, Orange, Apple, Kiwi)}% returns the four items separated by new lines
Useful to change the order of plugin execution. For example, it allows preprocessing to be done before %SEARCH{}% is evaluated. The percent character '%' can be escaped with $percnt. The quote character '"' can be escaped with $quot.
PROPERSPACE( text ) -- properly space out WikiWords
Properly spaces out WikiWords preceeded by white space, parenthesis, or ][. Words listed in the DONTSPACE TWikiPreferences variable or DONTSPACE plugins setting are excluded
Syntax: $PROPERSPACE( text )
Example: Assuming DONTSPACE contains MacDonald: %CALCULATE{$PROPERSPACE(Old MacDonald had a ServerFarm, EeEyeEeEyeOh)}% returns Old MacDonald had a Server Farm, Ee Eye Ee Eye Oh
REPLACE( text, start, num, new ) -- replace part of a text string
Replace num number of characters of text string text, starting at start, with new text new. Starting position is 1; use a negative start to count from the end of the text
Evaluates a simple formula and rounds the result up or down to the number of digits if digits is positive; to the nearest integer if digits is missing; or to the left of the decimal point if digits is negative
SEARCH( string, text, start ) -- search a string within a text
Finds one text string, within another text, and returns the number of the starting position of string, from the first character of text. This search is a RegularExpression search; use $FIND() for non-regular expression searching. Starting position is 1; a 0 is returned if nothing is matched
SET( name, value ) -- set a variable for later use
Specify the variable name (alphanumeric characters and underscores) and the value. The value may contain a formula; formulae are evaluated before the variable assignment; see $NOEXEC() if you want to prevent that. This function returns no output. Use $GET() to retrieve variables. Unlike table ranges, variables live for the time of the page view and persist across tables, i.e. you can use it to summarize results across several tables and also across included topics. If the value is omitted, the named variable is deleted.
Syntax: $SET( name, value )
Example: %CALC{$SET(my_total, $SUM($ABOVE()))}% sets the my_total variable to the sum of all table cells located above the current cell and returns an empty string
SETHASH( name, key, value ) -- set a hash value for later use, or delete a hash
Specify the hash name, key, and value. Allowed characters for the hash name are alphanumeric characters, underscores and period. This function returns no output. Use $GETHASH() to retrieve hash values. If the value is omitted, the key is deleted from the hash. If the key is omitted, the named hash is deleted. If no parameters are specified, all hashes are deleted.
Syntax: $SETHASH( name, key, value )
Example: %CALCULATE{$SETHASH(age, Jane, 26)}% sets key Jane of hash named age to 26
Example: %CALCULATE{$SETHASH(age, Jane,)}% sets key Jane of hash named age to an empty value
Example: %CALCULATE{$SETHASH(age, Jane)}% deletes key Jane of hash named age
Example: %CALCULATE{$SETHASH(age)}% deletes hash named age
Example: %CALCULATE{$SETHASH()}% deletes all hashes
SETIFEMPTY( name, value ) -- set a variable only if empty
Specify the variable name (alphanumeric characters and underscores) and the value.
Syntax: $SETIFEMPTY( name, value )
Example: %CALCULATE{$SETIFEMPTY(result, default)}% sets the result variable to default if the variable is empty or 0; in any case an empty string is returned
SETLIST( name, list ) -- save a list for later use
Specify the variable name (alphanumeric characters and underscores) and the list. This function returns no output. Use $GETLIST() to retrieve a list variable. Use $ADDLIST() to add a list to an existing variable. If no list is specified, the named variable is deleted.
SETM( name, formula ) -- modify an existing variable based on a formula
Specify the variable name (alphanumeric characters and underscores) and the formula. The formula must start with an operator to + (add), - (subtract), * (multiply), or / (divide) something to the variable. This function returns no output. Use $GET() to retrieve variables
Syntax: $SETM( name, formula )
Example: %CALC{$SETM(total, + $SUM($LEFT()))}% adds the sum of all table cells on the left to the total variable, and returns an empty string
SETMHASH( name, key, formula ) -- modify an existing hash based on a formula
Specify the hash name, key, and formula. Allowed characters for the hash name are alphanumeric characters, underscores and period. The formula must start with an operator to + (add), - (subtract), * (multiply), or / (divide) something to the hash variable. This function returns no output. Use $GETHASH() or $HASH2LIST to retrieve the values
Syntax: $SETMHASH( name, key, formula )
Examples: %CALCULATE{$SETHASH(count)}% deletes the count hash %CALCULATE{$SET(people, Anna, Jane, Berta, Charlie, Jane, Tom, Anna, Jane))}% sets the people list %CALCULATE{$LISTJOIN(, $LISTEACH($SETMHASH(count, $item, +1), $GET(people)))}% populates the count hash and returns nothing %CALCULATE{$HASH2LIST(count, $key: $value)}% returns Anna: 2, Berta: 1, Charlie: 1, Jane: 3, Tom: 1
SPLIT( separator, text ) -- split a string into a list
Split text into a list using separator as a delimiter. The separator may be a regular expression and may include $comma for comma, $sp for space and $empty to split at each character. Default separator is one or more spaces ($sp$sp*).
Syntax: $SPLIT( separator, text )
Example: %CALCULATE{$SPLIT(, Apple Orange Kiwi)}% returns Apple, Orange, Kiwi
Example: %CALCULATE{$SPLIT([-:]$sp*, Apple-Orange: Kiwi)}% returns Apple, Orange, Kiwi (the separator means: Dash or colon, followed by optional spaces
Example: %CALCULATE{$SPLIT($empty, Apple)}% returns A, p, p, l, e
STDEV( list ) -- standard deviation based on a sample
Calculates the standard deviation, assuming that the list is a sample of the population. Use $STDEVP() if your data represents the entire population. The standard deviation is a measure of how widely values are dispersed from the average (mean) value.
Syntax: $STDEV( list )
Example: %CALC{$STDEV(R2:C5..R$ROW(-1):C5)}% returns the standard deviation of column 5, excluding the title row
STDEVP( list ) -- standard deviation based on the entire population
Calculates the standard deviation, assuming that the list is the entire population. Use $STDEV() if your data represents a sample of the population. The standard deviation is a measure of how widely values are dispersed from the average (mean) value.
Syntax: $STDEVP( list )
Example: %CALC{$STDEVP(R2:C5..R$ROW(-1):C5)}% returns the standard deviation of column 5, excluding the title row
SUBSTITUTE( text, old, new, instance, option ) -- substitute text
Substitutes new text for old text in a text string. instance specifies which occurance of old you want to replace. If you specify instance, only that instance is replaced. Otherwise, every occurance is changed to the new text. A literal search is performed by default; a RegularExpression search if the option is set to r
SUBSTRING( text, start, num ) -- extract a substring out of a text string
Extract num number of characters of text string text, starting at start. Starting position is 1; use a negative start to count from the end of the text. All parameters are required - the text may contain commas.
SUMDAYS( list ) -- sum the days in a list or range of cells
The total number of days in a list or range of cells containing numbers of hours, days or weeks. The default unit is days; units are indicated by a h, hours, d, days, w, weeks suffix. One week is assumed to have 5 working days, one day 8 hours
Syntax: $SUMDAYS( list )
Example: %CALCULATE{$SUMDAYS(2w, 1, 2d, 4h)}% returns 13.5, the evaluation of (2*5 + 1 + 2 + 4/8)
SUMPRODUCT( list, list ) -- scalar product on ranges of cells
Syntax: $SUMPRODUCT( list, list, list... )
Example: %CALC{$SUMPRODUCT(R2:C1..R4:C1, R2:C5..R4:C5)}% evaluates and returns the result of ($T(R2:C1) * $T(R2:C5) + $T(R3:C1) * $T(R3:C5) + $T(R4:C1) * $T(R4:C5))
TIME( text ) -- convert a date string into a serialized date number
Serialized date is seconds since the Epoch, e.g. midnight, 01 Jan 1970. Current time is taken if the date string is empty. Supported date formats: 31 Dec 2009; 31 Dec 2009 GMT; 31 Dec 09; 31-Dec-2009; 31/Dec/2009; 31 Dec 2003 - 23:59; 31 Dec 2003 - 23:59:59; 2009/12/31; 2009-12-31; 2009/12/31; 2009/12/31 23:59; 2009/12/31 - 23:59; 2009-12-31-23-59; 2009/12/31 - 23:59:59; 2009.12.31.23.59.59. DOY (Day of Year) formats: DOY2003.365, DOY2003.365.23.59, DOY2003.365.23.59.59. Date is assumed to be server time; add GMT to indicate Greenwich time zone
TIMEADD( serial, value, unit ) -- add a value to a serialized date
The unit is seconds if not specified; unit can be second, minute, hour, day, week, month, year. Note: An approximation is used for month and year calculations
Syntax: $TIMEADD( serial, value, unit )
Example: %CALCULATE{$TIMEADD($TIME(), 2, week)}% returns the serialized date two weeks from now
TIMEDIFF( serial_1, serial_2, unit ) -- time difference between two serialized dates
The unit is seconds if not specified; unit can be specified as in $TIMEADD().
Notes: An approximation is used for month and year calculations. Use $ROUND() to round day unit to account for daylight savings time change. Use $FORMAT(), $FORMATTIMEDIFF() or $INT() to format real numbers
TRANSLATE( text, from, to ) -- translate text from one set of characters to another
The translation is done from a set to a set, one character by one. The text may contain commas; all three parameters are required. The from and to parameters support tokens $comma for comma, $sp for space, $quot for double quote, $aquot for apostrophe quote, and $n for newline
WHILE( condition, do ) -- do something while a condition is true
The condition can be a number (where 0 means condition not met), or two numbers with a comparison operator < (less than), <= (less than or equal), == (equal), != (not equal), >= (greater than or equal), > (greater than).
The condition and do are evaluated in each cycle; a $counter starting at 1 can be used in condition and do.
Specifically, how can I output some conditional text in a FormattedSearch?
You need to escape the CALCULATE so that it executes once per search hit. This can be done by escaping the % signs of %CALCULATE{...}% with $percnt. For example, to execute $IF($EXACT($formfield(Tested), Yes), %ICONURL{choice-yes}%, %ICONURL{choice-no}%) in the format="" parameter, write this:
%SEARCH{ .... format="| $topic | $percntCALCULATE{$IF($EXACT($formfield(Tested), Yes), %ICONURL{choice-yes}%, %ICONURL{choice-no}%)}$percnt |" }%
What are hashes and what are they used for?
Hashes are named sets of key & value pairs. For example, a hash called age may have first names as keys and ages as values. In TWiki's case you might do a FormattedSearch and store the result in hashes, then display the result in various formats. For example, you want to show feature requests in multiple tables, organized by status. Adding a search for each status is possible, but it can be slow. The page loads faster if you search only once, and store the status, summary, date and other fields in hashes. Then you use those hashes to render each table by status.
Example:
First we search all features and store the status, summary and date in hashes, using the topic name as the key. Then we build a table that shows all proposed features, followed by a table showing all accepted features. Reading the CALCULATE formula from inside out:
$GETHASH(status) - returns the list of all keys of the status hash, e.g. all topics found
$LISTIF($EXACT($GETHASH(status, $item), Proposed), ...) - filter the topic list and keeps only those of status Proposed
$LISTEACH(| [[$item]]: $GETHASH(summary, $item) | ... |, ...) - format each topic as a table row
$LISTJOIN($n, ...) - convert the comma-space list into lines separated by newlines
How can I easily repeat a formula in a table?
To repeat the same formula in all cells of a table row define the formula once in a preferences setting and use that in the CALC. The preferences setting can be defined at the site level, web level or topic level, and may be hidden in HTML comments. Example:
<!--
* Set MYFORMULA = $EVAL($SUBSTITUTE(...etc...))
-->
| A | 1 | %CALC{%MYFORMULA%}% |
| B | 2 | %CALC{%MYFORMULA%}% |
| C | 3 | %CALC{%MYFORMULA%}% |
CALC in Included Topics
By default, CALCs in an included topic are evaluated with delay. The SKIPINCLUDE setting tells the plugin to evaluate the CALCs once all INCLUDEs are processed. This default behavior is chosen so that it is possible to compose a bigger table from several includes and do some spreadsheet calculation over the whole table.
Attention: You can get unexpected results if you INCLUDE a topic that has other variables taking action on CALCs. For example, a CHART in an included topic sees unprocessed CALCs, which may result in a chart with incorrect values. To get he desired result you need to set the following preference setting in the topic that includes the topic containing the CHART:
Set SPREADSHEETPLUGIN_SKIPINCLUDE = 0
This setting tells the SpreadSheetPlugin to process the CALCs in the included page, e.g. it will not delay the evaluation of the functions.
Above table is created manually. The table can be build dynamically with a formatted search, or by a plugin that pulls data from an external source, such as a bug tracking system.
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %SPREADSHEETPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Add spreadsheet calculation like "$SUM( $ABOVE() )" to TWiki tables or anywhere in topic text
Debug plugin: (See output in data/debug.txt)
Set DEBUG = 0
Do not handle %CALC{}% variable in included topic while including topic: (default: 1) (See note CALC in Included Topics)
Set SKIPINCLUDE = 1
Currency symbol. Specify US$ or $ for Dollar, € for Euro, ¥ for Yen:
Set CURRENCYSYMBOL = $
WikiWords to exclude from being spaced out by the $PROPERSPACE(text) function. This comma delimited list can be overloaded by a DONTSPACE preferences variable:
Set DONTSPACE = CodeWarrior, MacDonald, McIntosh, RedHat, SuSE
Plugin Installation Instructions
This plugin is pre-installed. TWiki administrators can upgrade the plugin as needed on the TWiki server.
TWikibug:Item7418: Fix VALUE function bug with incorrect exponential number; ability to delete SET variable; do not strip trailing spaces in SETIFEMPTY
2013-10-10:
TWikibug:Item7154: Doc update: Put TOC on top right for easy reference
TWikibug:Item6866: Added CALCULATE variable using register tag handler to support proper inside-out, left-to-right eval order like ordinary TWiki variables
Added $ABS(), $LISTIF(); fixed $VALUE() to remove leading zeros; changed $FIND() and $SEARCH() to return 0 instead of empty string if no match
21 Mar 2004:
Added $LISTITEM(); fixed call to unofficial function
16 Mar 2004:
Added $LISTMAP(), $LISTREVERSE(), $LISTSIZE(), $LISTSORT(), $LISTUNIQUE(), $SETM(); retired $COUNTUNIQUE() in favor of $COUNTITEMS($LISTUNIQUE()); fixed evaluation order issue of $IF(); fixed missing eval error messages suppressed since version 06 Mar 2004; redirect stderr messages to warning
08 Mar 2004:
Added $LIST()
06 Mar 2004:
Added $AND(), $MOD(), $NOT(), $OR(), $PRODUCT(), $PROPER(), $PROPERSPACE(), $RAND(), $REPEAT(), $SIGN(), $VALUE(); added digits parameter to $ROUND(); renamed $MULT() to $PRODUCT(); $MULT() is deprecated and undocumented
Added support for lists (1, 2, 3) and lists of table ranges (R1:C1..R1:C5, R3:C1..R3:C5) for all functions that accept a table range; added $TIMEADD(); in $TIMEDIFF() added week unit; in $FORMATTIME() changed $weekday to $wd and added $wday and $weekday
Added $FIND(), $NOP(), $REPLACE(), $SEARCH(), $SUBSTITUTE(), contributed by TWiki:Main/PaulineCheung
19 Apr 2003:
Added $COUNTSTR(), $EXACT(), $IF(), $ROUND(), $TRIM(); added $FORMAT(), contributed by TWiki:Main/JimStraus; support % modulus operator in $EVAL(), $INT(), and $ROUND(); fixed bug in $DEF()