Please enable JavaScript to view this site.

ESL Documentation

Functions take their arguments by value or by reference and return a single value as a result. For example, the SQRT( ) function takes as its argument a float value and returns the value's square root, also as a float value. A function call can be placed in any location where a variable of the same type could be used. For example:

 

copy (HasLower(String)) to HasLower_BV

 

The prototype for declaring an external function is as follows:

 

function EslExtFunc([small] TYPE [reference] : PARAM1,

[small] TYPE [reference] : PARAM2) returns [small] TYPE

library "DLLNAME"

 

where TYPE is one of the ESL data types INTEGER, FLOAT, BOOLEAN, STRING, or STRUCTURE.

 

Each of the following function declarations is followed by a call to the function:

 

# Search a string for lower case characters

function HasLower(string:MixedCaseString)

  returns boolean

  library "example"

 

# check for lowercase 

if(HasLower(String)) then

  change Object4_EF text to "TRUE"

else

  change Object4_EF text to "FALSE"

end if

 

# Change a string to be lower case only

function MakeLower(string reference:MixedCaseString)

  returns small integer

  library "example"

 

# convert to lowercase

copy MakeLower(Temp) to Errorlevel_IV