EPL Data Type

EPL data types classifies by System-Basic data type, Library-Defined data type, and User-Defined data type.

System-Basic Data Type

Data Type Description
Byte Contains an integer value between 0 to 255. 1 byte size (8 bits).
Short Contains an integer value between -32768 to 32767. 2 bytes size (16 bits).
Integer Contains an integer value between -2147483648 to 2147483647. 4 bytes size (32 bits).
Int64 Contains an integer value between -9223372036854775808 to 9223372036854775807. 8 bytes size (64bits).
Float Contains a floating point value between 3.4E-38 to 3.4E38. 4 bytes size (32 bits).
Double Contains a floating point value between 1.7E-308 to 1.7E308. 8 bytes size (64 bits).
Boolean Contains a value to indicate True or False. 2 bytes size (16 bits)
DateTime Records date and time. 8 bytes size (64 bits).
String A character string terminated with 0. Stores text data.
Bin A data section in binary format. The Bin and Byte Array convert between from each other. The difference between Bin and Byte Array is Bin can change length automatically or manually, but Byte Array can only change length manually.
FunctionAddress A pointer to a function to indicate function's address. 4 bytes size (32 bits). This data type is only valid in Dll command parameter.

Byte/Short/Integer/Int64/Float/Double can be named as "Number", converting between each number type is possible. Notice: converting may possibly lose data precision

 

All data type only be valid in internal EPL system, matches all supported data types

 

See picture below

EPL

Library-Defined Data Type

All the EPL provided controls, objects are all data types, such as Picturebox, TextBox, Button etc, even Form. These data types may have methods, properties and events, and can also have interface, and all the data types are in EPL Library also include Kernel library

 

Add Control by Code

You can use the “CopyControl” function to copy an already existed form control. If you want to copy an already existed control of “PaintBox1” on the form, you can code likes this

EPL

User-Defined Data Type

You can define your own data type (User-Defined Data Type) in your application, the data type can contain System-Basic Data Type, Library-Defined Data Type and other User-Defined data type. The user-defined type can contains multi-items of different data type.

To declare a variable of user-defined data type, it is just same as declare a variable. To use, use “VariableName.ItemName” calling way.

For example, if you want to store a data that indicates a rectangle’s size and position, you can first define a data type named RECT

EPL

and declare a RECT type variable named rt, and then use “rt.” + item name to access every items of the variable.

EPL

To add a new user-defined data type, just click Insert ->Data Type menu.

Data Type Conversion

To convert the data between the different System-Basic data types, you can call the following function,

Function Destination Type Description
Cbyte Byte Retrieves Byte type value in string, the string is a proper number, support SBC case. This function can also convert other data types to Byte
CShort Short Retrieves Short type value in string, the string is a proper number, support SBC case. This function can also convert other data type to Short
CLng Integer Retrieves Integer type value in string, the string is proper number, support SBC case. This function can also convert other data type to Integer
CInt64 Int64 Retrieves Int64 type value in string, the string is proper number, support SBC case. This function can also convert other data type to Int64
CFloat Float Retrieves floating-point value in string, the string is proper number, support SBC case. This function can also convert other data type floating-point value
Val Double Returns the numbers contained in a string as a numeric value of appropriate type
CStr String Converts a number, Boolean and DateTime to String. If parameter is string type, return directly
CTime DateTime Returns time after convert specified string to time. Returns time of "January 1st, 100", if specified string type or the exact time value is incorrect
CBin Bin Returns the Bin type data that converted from the specified data

When you convert data between different data type, you must take care of the data precision problem, if you convert from high precision type to low precision type, possibly lost data precision, such as convert a value from Integer type to Short type, if the Integer type value is greater 32767, the data will be lost and occurs overflow.