2. Embedded QUEL for C : C Variables and Data Types : Data Type Conversion : Runtime Numeric Conversion
 
Share this page                  
Runtime Numeric Conversion
The Ingres runtime system provides automatic data type conversion between numeric-type values in the database and the forms system and numeric C variables. It follows the standard type conversion rules. For example, if you assign a float variable to an integer-valued field, the digits after the decimal point of the variable's value are truncated. Runtime errors are generated for overflow on conversion.
Unsigned integers can be assigned to and retrieved from the database wherever plain integers are used. However, take care when using an unsigned integer whose positive value is large enough to cause the high order bit to be set. Integers such as these are treated as negative numbers in Ingres arithmetic expressions and display as negative numbers by the Forms Runtime system.
The Ingres money type is represented as an 8-byte floating-point value, compatible with a C double.