Any variables built up from the
char data type, except simple variables declared without any C indirection, are compatible with any Ingres character string objects. As previously mentioned, a variable of type
char declared without any C indirection is considered an integer variable. The preprocessor treats an array of characters and a pointer to a character string in the same way. Always null-terminate a character string if the string is to be assigned to an Ingres object. automatically null terminates any character string values that are retrieved into C character string variables. Consequently, any variable that you use to receive Ingres values must be declared as the maximum object length, plus one extra byte for the C null string terminator. For more information, see
Runtime Character Conversion.
The following example declares three character variables--one integer and two strings:
For more information on character strings that contain embedded nulls, see
The Varying Length String Type.