7. Embedded SQL for Pascal : Pascal Variables and Data Types : Data Type Conversion : Runtime Numeric Type Conversion
 
Share this page                  
Runtime Numeric Type Conversion
The Ingres runtime system provides automatic data type conversion between numeric-type values in the database and forms system and numeric Pascal variables. The standard type conversion rules (according to standard VAX rules) are followed. For example, if you assign a real 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 when assigning Ingres numeric values into Pascal variables. Overflow caused by assigning Pascal numeric variables into Ingres numeric objects is likely to result in inconsistent data, but does not by default generate a runtime error. Using the -x flag on the Ingres statement changes this default behavior by generating errors at runtime.
The Ingres money type is represented as double, an 8-byte floating-point value.