Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TSDWIN: Clipper 5.0 Interface Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

 twDec2Sci( nDecimal, nPrecision, nLength )
 ----------------------------------------------------------------------------
     The functions twDec2Sci(), twSci2Dec(), twStr2Num() and
     twNum2Str() attempt to provide a temporary solution to Clipper's
     inability to display floating point numbers.

     twDec2Sci() returns a string representation of a number out of
     range of the display capabilities of Clipper. Clipper 5.01 uses
     MSC alternate math to do calculations within a range of about
     10-308 to 10308, but display functions, including VAL() fill
     variables out of range, ie, greater than 17 digits, with
     asterisks. While it is possible to define numeric DBF fields
     greater than this, Clipper cannot properly handle their display.

     NOTE: Numbers outside the MSC calculation range will result in a
           MSC error which cannot be trapped with ERRORSYS.

       Arguments:

     nDecimal   - 'N' Numeric value which can be out of range of the
                      display capabilities of Clipper.

     nPrecision - 'N' Number less than 19.

     nLength    - 'N' Length of the returned string. The default is to
                      create  a return string 24 characters long to
                      represent the passed number.

       Return:

     String representation of the passed number in scientific notation
     of the form:

             Mantissa E exponent

     NOTE: A side effect of this function is that SET DECIMALS is
           adjusted to a number required to create the string.

                            BE WARNED!

       Example:

     twDec2Sci( 234567.23456 )  -> 2.3456723456E05

     twDec2Sci( 0.00000003456 ) -> 3.456E-09

See Also: twSci2Dec() twNum2Str() twStr2Num()

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