Syntax

SET HIGHPRECISION ON | OFF

 

Description

Since the background of most calculations in dBASE use a floating point decimal, this means that values may be interpreted with a fraction (for example 0.09999999 instead of 0.1).  Some calculations (such as ROUND()) may need to have HIGHPRECISION set ON in order to return the correct value.

When OFF, numeric constants entered in command window or in dBASE source code are stored, internally, as 64 bit doubles (the way they have been in all 32 bit versions of dBASE).         When ON, numeric constants entered in command window or in dBASE Source Code are stored, internally, as High Precision Decimal Float value with 34 digits of precision. This will allow for a more accurate interpretation of fractional values.


Added new .INI file setting in section [OnOffCommandSettings]:

            HIGHPRECISION=ON  or OFF

In addition, you can check the current highprecision setting via:

? set("highprecision")

Or by running the List Status or Display Status command which now show the highprecision setting along with the other SET command settings.