Calculates the value of the enclosed (Perl) expression.
- [calcn] Perl expression [/calcn]
||Suppress any output text that would ordinarily be returned from this tag.
(This universal parameter was introduced with Interchange version 5.5.2.)
||Parse Interchange tags, included in the body text, before this container tag executes.
||Process any Interchange tags found in the text output from this tag.
This tag is equivalent to [calc], except that it does not
interpolate by default.
The enclosed region where the arguments are calculated according to
normal arithmetic symbols.
will expand to:
The [calcn] tag is really the same as the [perl]
tag, except that it doesn't accept arguments and is more efficient to parse.
This tag does not interpolate its body text by default.
Interpolation can be turned on by either passing the interpolate=1
parameter, or by simply using the [calc] tag instead.
The [calcn] tag will remember variable values inside
the current page,
unless scoped with "my",
so you can do the equivalent of a memory store and recall for a loop.
Having said that,
you must ensure that unscoped variables are initialised to a known
value before they are used,
as their default value cannot be relied upon.
Object references are available for most Interchange tags and functions,
as well as direct references to Interchange session and configuration values.
See Interchange Perl objects for more information.