Dear Ada Enthusiasts,
type Long_Money_Type is delta 10.0**(-22) digits 38;
On The First Machine Ubuntu Linux 64 bit GNAT 8.3.0 this works.
On The Second Machine Alpine Linux 64 Bit GNAT 10.3.1 20211027 i get this error:
adx-lib-money.ads:14:29: scale exceeds maximum value of 18
adx-lib-money.ads:14:54: digits value out of range, maximum is 18
Is There an way to change the maximum value ?
2
Answers
This problem doesn’t occur with GCC 11 and later, so it looks as though you need to upgrade.
Expanding on @Simon Wright’s answer, the Ada standard identifies certain Implementation-Defined Characteristics in a way that "allows for certain machine dependences in a controlled manner". In particular,
As a concrete example, the GNAT 12.2 Reference Manual responds as follows:
As a result, when searching for a suitable upgrade, verify that you choose the 64-bit version if both are available.