2. Embedded QUEL for C : C Variables and Data Types : Variable and Type Declarations : Indicator Variables
 
Share this page                  
Indicator Variables
An indicator variable is a 2-byte integer variable. You can use these in three ways in an application:
In a statement that retrieves data from Ingres, you can use an indicator variable to determine if its associated host variable was assigned a null.
In a statement that sets data to Ingres, you can use an indicator variable 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 variable to ensure that the associated host variable is large enough to hold the full length of the returned character string.
The base type for an indicator variable must be the integer type short. Any type specification built up from short is legal, for example:
## short    ind;           /* Indicator variable */
## typedef  short   IND;

## IND      ind_arr[10];   /* Array of indicators */
## IND      *ind_ptr;      /* Pointer to indicator */