DEFINE

DEFINE statement is used to declare the names and the data types of the 4GL variables.

DEFINE statement can be followed by one or more declare blocks separated by commas:

Data type declaration

A block where a user-defined data type is declared

Variable declaration

A block where the data type of a variable is declared

 

There are two patterns of declaration in Querix 4GL:

These blocks can co-exist within one DEFINE statement.

A name of a variable can be any set of characters except for the names that are reserved for the built-in global variables like status, int_flag, quit_flag, etc. A variable that has not been defined cannot be used in the program code.

The total space that can be occupied by the variable names of one program is limited to 2 gigabytes, although your system can impose additional constraints on the storage space available for the variable names. In programs compiled to p-code, the storage space allocated for the variable names of a report or a function cannot be larger than 32,767 bytes.

Variables defined within a GLOBALS file can be visible to all the program modules which use this GLOBALS file.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.