qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDBL Function Programming Example
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
CDBL Programming Example
 
The following example demonstrates how the precision of the numeric
expression affects the result of using CDBL:
 
X = 7/9
X# = 7/9
PRINT X
'Both X# and CDBL(X) will be accurate to only 7 decimal
'places, because 7/9 is evaluated in single precision.
PRINT X#
PRINT CDBL(X)
'Accurate to 15 decimal places.
PRINT 7#/9#
 
Sample Output
 
 .7777778
 .7777777910232544
 .7777777910232544
 .7777777777777778