ePages 6.17.9 - DE_EPAGES/TLE/API/CalculateHandler.pm

Package DE_EPAGES::TLE::API::CalculateHandler

Functions

CALCULATE
COMPARE
DEFINED
LENGTH
WORDCOUNT
tle

CALCULATE

Returns the calculated expression.

Syntax
#CALCULATE( #Expression )
Example
#CALCULATE( #Price/100.0 )
Input
#Expression (string)
TLE language expression

COMPARE

Compares the two values given with parameter 2 and 3 using the type given with parameter 1.

Syntax
#COMPARE( #Type, #LeftSide, #RightSide );
Input
#Type (string)
data type to use for comparison
#LeftSide (scalar)
first value for comparison
#RightSide (scalar)
second value for comparison
Return
#RESULT (integer)
0 if equal / -1 if smaller / 1 if greater

DEFINED

Returns true if the value is defined.

Syntax
#DEFINED( #Value )
Example
#IF( #DEFINED( #Value ) )
  #Value
#ELSE
  {DefaultValue}
#ENDIF
Input
#Value (any)
value

LENGTH

Returns the length of a string.

Syntax
#LENGTH( #String );
Input
#String (string)
value to calculate length
Return
#RESULT (integer)
length of the string

WORDCOUNT

Returns the number of words in a string.

Syntax
#WORDCOUNT( #String );
Input
#String (string)
value to calculate word count
Return
#RESULT (integer)
number of words

tle

#Undef returns an undefined value.
#GENERATEGUID retruns a new globally unique identifier

Syntax
#Undef
Example
#GENERATEGUID