7. Embedded QUEL for Pascal : Pascal Variables and Data Types : Variable and Type Declarations : The Indicator Type
 
Share this page                  
The Indicator Type
An indicator type is a 2-byte integer type. There are three possible ways to use these in an application:
In a statement that retrieves data from Ingres, you can use an indicator type to determine if its associated host variable was assigned a null.
In a statement that sets data to Ingres, you can use an indicator type to assign a null to the database column, form field, or table field column.
In a statement that retrieves character data from Ingres, you can use the indicator type as a check that the associated host variable is large enough to hold the full length of the returned character string.
EQUEL/Pascal predefines the 2-byte integer type indicator. As with other types, you should not redefine the indicator type. This type definition is in the file that is included when preprocessing the EQUEL declare or inherit directives. The type declaration syntax is:
type
        Indicator = [word] -32768..32767;
Because the type definition is in the referenced include file, you can only declare variables of type indicator after you have issued declare or inherit. This declaration does not preclude you from declaring indicator types of other 2-byte integer types.