To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
Variables of any data type or declared LIKE a table column are defined using the following pattern:
Element |
Description |
Identifier |
The name of the declared variable |
Column Id |
A name of a database column in the format table.column. It can also be preceded by other table qualifiers: as table owner, server name and database |
4GL Data Type |
Any 4GL data type or user defined data type or a table column preceded by the LIKE keyword |
Here are the examples of data types declaration:
A 4GL data type after the name of the variable
DEFINE var1 INTEGER
A previously defined user data type after the name of the variable (for more information about user-defined data types, see Data Type Declaration):
DEFINE var3 my_datatype
The OF keyword is optional, it can be used to specify both 4GL and user-defined data types. Its presence or absence does not influence the result of declaration. The examples below will have the same effect as the examples above.
DEFINE var1 OF INTEGER
DEFINE var3 OF my_datatype
You can define a variable of the following Querix 4GL data types:
Simple Data Type (to see which data types refer to simple, see "Simple Data Types" section of the "Querix 4GL Data Types" chapter)
Large Data Type (to see which data types refer to large, see "Large Data Types" section of the "Querix 4GL Data Types" chapter)
Structured Data Type (to see which data types refer to structured, see "Structured Data Types" section of the "Querix 4GL Data Types" chapter)
The simple and large data types are declared by putting the name of the data type after the variable name as shown below:
DEFINE
var1 CHAR(20),
var2 INT,
var3 BYTE
Those data types that have size or precision can have them in the parentheses following the name of the data type directly (e.g. CHAR(20) ). The declaration of structured data types is performed in accordance with declaration patterns illustrated below.