The variable can store temporary data by evaluating operator “=” or “Set”, “SetBatch” functions when application is running. Every variable have a name to identify, and the variable can be contained in user-defined data type.
The EPL Variable has three different Operating-Domains, which are Global, Module, and Local. The Global Variable can be used in any code-able place of the application, the Module Variable can be used in any code-able place of the module, and the Local Variable can be used in the function of its container.
The following pictures shows variable in the three domains.

Global Variable

Module Variable

Local Variable
The variable can be static type or unstatic type as usual. Unstatic type variable in EPL can be initialized automatically. Before first time to execute the domain that variable locates in, the Number type variable will be initialized to 0, Boolean type variable will initialized to False, DataTime type will be initialized to 0:0:0 1899-12-30, String type will be initialized to empty text (“”), Bin type will be initialized to empty bin, FunctionAddress will be initialized to empty function address.
Unarray variable can be evaluated by an invariable, constant, resource, object, object property, function-return-value and variable. The data type of evaluating data must be same as the evaluated variable, or they can convert between each other. The variable can also be used by other variable like a reference, just evaluate the variable to another variable, and the evaluated variable is the evaluating variable’s reference.
To evaluate, you can use “=” operator or “Set”, “SetBatch” functions.
The SetBatch() function evaluates multi-variables with one same value in a same time. The following picture shows how to use this function.

One variable must define these elements that list below
| Elements | Description |
|---|---|
| Variable Name | Defines the name of the variable for identifying and calling |
| Data Type | Defines data type that the variable can store |
| Static | This element must be defined for local variable. The static variable will be initialized automatically only one time, and the initialization is before first time using. The value of static variable will never be initialized automatically more than one time. |
| Array | Defines whether the variable is an array and its bound amount of each dimension. If it’s multi-dimensional array, use “,” character to separate each dimension’s bound amount, such as “1,2,3”. The array item-index of each dimension is starting from 1. To operate an item of array, just use mark”[n][n]” to specify which item of an array. All the multi-dimensional array can be used as single-dimensional array, such as: an array that defined as “2,3”, its item [2][2] can be usd by [5] as single-dimensional array |
Array Definition
To define an array, you just write the array dimensions and size to “Array” attribute on a pre-defined variable. Such as: input “3” to Array attribute of pre-defined variable named “arr”, the “arr” array has three items of arr[1], arr[2], arr[3]. See picture below
the “arr” Array list forward as arr[1], arr[2], arr[3]
To define multi-dimensional array, you can use “,” mark to separate each dimension’s bound definition, higher dimension is on the left, such as if you want to define two-dimensional array named “arr”, and each dimension has 2 items, you can write the “Array” attribute as “2,2”, see picture below
the “arr” Array list forward as arr[1][1], arr[1][2], arr[2][1],arr[2][2].
You can also access multi-dimensional array like accessing one dimensional array. Such as access previous defined “arr” two dimensional Array forward by arr[1](arr[1][1]), arr[2](arr[1][2]), arr[3](arr[2][1]), arr[4](arr[2][2]).
Array Evaluation
To evaluate an array, you can directly use the Array name and specify which item to evaluate, such as if you want to evaluate the second item of the one-dimensional Array named “arr” by number 1000, code like the following
arr[1] = 1000
You can evaluate array item by variable, invariable, return value etc.
You may also evaluate multi-items of an array in same time only cost one code line, the “{}” mark can surround all the evaluating value, and “,” mark will separate each value. Such as the following code
arr = {1,2}
can be instead of
arr[1] = 1
arr[2] = 2
Note: an item of array can be used as a variable.
EPL provides several useful functions to operate array, all the related functions are listed below
| Function | Description |
|---|---|
| Redim | Redefines the dimensions and dimension-bounds of an array |
| GetItemCount | Retrieves the numbers of all the items in an array. Returns -1 if the parameter is not an array. This allow you use this function to determine whether a variable is an array |
| Ubound | Returns the largest available subscript for the specified dimension of an array. Returns 0 if the specified variable is not array or the specified dimension doesn't exist |
| CopyArray | Copies the data of the array to specified array variable. All the data and dimension information of the specified variable will be overwritten |
| AddItem | Adds the data to the end of the specified array. The numbers of items is increased automatically. If the array is multidimensional array, it will be converted to single dimension |
| InsertItem | Inserts the data to the specified position of the array. The numbers of element will be increased automatically. If the array is multi-dimensional array, it will be converted to single dimension |
| RemoveItem | Removes the specified item of an array. The numbers of item will be decreased automatically. If the array is multi-dimensional array, it will be converted to single dimension |
| ClearArray | Removes all the items in an array, frees related memory, and redefines it to empty array(Single dimension, no element) |
| SortArray | Sorts the items of an array. The dimension is unchanged. The result is set back to this array |
| ZeroArray | Sets all variable of the numerical array to 0, it doesn't change the dimension of the array |