6. Embedded QUEL for BASIC : BASIC Variables and Data Types : Variable and Type Declarations : The Indicator Variable
 
Share this page                  
The Indicator Variable
An indicator variable is a 2-byte integer variable. There are three possible ways to use these 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 as a check that the associated host variable is large enough to hold the full length of the returned character string.
An indicator variable can be declared using the integer word subtype, or, if the -i2 preprocessor command line flag was used, can be declared as an integer. The following example declares two indicator variables, one a single variable and the other an array of indicators:
##   declare word ind, ind_arr(10)