Defining Long Floating-point Storage
The storage representation format of long floating-point variables must be
d_float. (For information, see
Ada Variables and Data Types. This is because the EQUEL runtime system uses that format for floating-point conversions. If your EQUEL program has
long_float variables that interact with the EQUEL runtime system, you must make sure they are stored in the
d_float format. The default Ada format is
g_float. A convenient way to control the format of all long float variables is to issue the
acs set pragma program command. For example, by issuing the following command you redefine the program library characteristics for
long_float from the default to
d_float:
$ acs set pragma/long_float=d_float
A second remedy to this particular problem is to issue the statement:
pragma long_float(d_float)
in the source file of each compilation unit that uses floating-point variables. You may also explicitly declare the EQUEL variables with type d_float, as defined in package SYSTEM.
The following example is a typical command file that sets up a new Ada program library with the EQUEL package specifications and the d_float numerical format. The name of the new program library is passed in as a parameter:
$ acs create library [.'p1']
$ acs set library [.'p1']
$ acs set pragma/long_float=d_float
$ copy ii_system:[ingres.files]eqdef.ada []
$ ada eqdef.ada
$ delete eqdef.ada.
$ exit