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

Package DE_EPAGES::TLE::API::CalculateHandler

TLE format handler includes TLE functions :

Example
#CALCULATE(100 / 5.0)
#IF(#DEFINED(#CellPhone)){CellPhone} #CellPhone #ENDIF
To call #DEFINED function is neccessary because the #CellPhone can
include 0 and non digit character.

Functions

COMPARE
LENGTH

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

LENGTH

Returns the length of a string.

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