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

     SET DECIMALS TO [<nDecimals>]

 Arguments

     TO <nDecimals> is the number of decimal places to display.  The
     default value is two.

     SET DECIMALS TO with no argument is equivalent to SET DECIMALS TO 0.

 Description

     SET DECIMALS determines the number of decimal places displayed in the
     results of numeric functions and calculations.  Its operation depends
     directly on the FIXED setting.  If FIXED is OFF, SET DECIMALS
     establishes the minimum number of decimal digits displayed by EXP(),
     LOG(), SQRT(), and division operations.  If FIXED is ON, all numeric
     values are displayed with exactly the number of decimal places specified
     by SET DECIMALS.  Note that neither SET DECIMALS nor SET FIXED affects
     the actual numeric precision of calculations--only the display format is
     affected.

     To provide finer control of numeric display, you can use the PICTURE
     clause of @...SAY, @...GET, and the TRANSFORM() function.

 Examples

     .  These examples show various results of the SET DECIMALS
        command:

        SET FIXED ON
        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

 Files:  Library is CLIPPER.LIB.

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

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