4. Embedded QUEL for Fortran : Fortran 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 the forms system and numeric Fortran variables. It follows the standard type conversion rules. 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 to Fortran variables.
The default size of integers in EQUEL/Fortran is four bytes. You can change the default size to two bytes by means of the -i2 preprocessor flag. If you use this flag, you must compile the program with the -i2 flag for UNIX, the noi4 qualifier for VMS, or the /integer_size:16 flag for Windows.
The Ingres money type is represented as an 8-byte real value, compatible with a Fortran real*8.