Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>set decimals</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET DECIMALS


Syntax:     SET DECIMALS TO <expN>

Purpose:    To set the number of decimal places displayed for the
            results of numeric functions and calculations.

Argument:   <expN> is the number of decimal places to display.

Usage:      The operation of SET DECIMALS depends on the FIXED SETting.
            If FIXED is OFF, then only the displayed results of SQRT(),
            EXP(), LOG(), and division are affected by SET DECIMALS.  If
            FIXED is ON, then any numeric value, when displayed, is
            affected by SET DECIMALS.  Note that neither SET DECIMALS
            nor SET FIXED affects the actual numeric precision of
            calculations--only the display format is affected.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   SET DECIMALS TO 2    && The default setting.
   ? 2/4                && Result: 0.50
   ? 1/3                && Result: 0.33
   SET DECIMALS TO 4
   ? 2/4                && Result: 0.5000
   ? 1/3                && Result: 0.3333


See Also: @...SAY...GET SET FIXED TRANSFORM()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson