Home

Communication Horizons
established 1986

Home
Contact

 

Knowledgebase Index
About Us
Contact
Legacy Products


Communication Horizons
65 High Ridge Rd. #428
Stamford CT 06905

info@netlib.com

800-480-1604
203-321-1278
fax  286-1056

       

Knowledgebase


>>ITEM : R01001 
>>DATE: 07/30/97  
>>TYPE: Information

>>TITLE: Btrieve floating point numbers
display incorrectly

>>PRODUCT(S):
RaSQL/B (all versions) for FoxPro
RaSQL/B (all versions) for Clipper
RaSQL/X (all versions) for FoxPro
RaSQL/X (all versions) for Clipper

>>PLATFORMS(S):
Btrieve (all versions)

>>SUMMARY: Floating point numbers displays 
with incorrect number of decimal digits, or
apparently incorrect digits after decimal point.

>>MORE INFORMATION:
Floating point number is RaSQL/B are defined as
type NF (IEEE floating point) or NB (MS or
Basic floating point).

Floating point numbers do not have a predefined
number of positions after the decimal point for 
display purposes. How they are displayed depends 
on the associated PICTURE clause, or the current
SET DECIMALS if no picture is specified. If
necessary,  numbers may be rounded for display 
purposes. However, all digits are maintained 
internally for calculation purposes.

>>RESOLUTION/FIX:
Specify a PICTURE clause whenever displaying
a floating point number. Alternatively, change SET 
DECIMALS to display additional digits after the 
decimal point.The default value of SET DECIMALS 
is 2.



>> EXAMPLE
* assume nFloat is internally stored as 3.666660
* SET DECIMALS default is 2
@ 1,0 SAY nFloat	
* displays as 3.67 due to rounding
@ 2,0 SAY nFloat PICTURE "9.999999"
*  displayed as 3.666660
SET DECIMALS TO 6
@  3,0 SAY nFloat
* displays as 3.666660

>>SEE ALSO:

>>COPYRIGHT 1997 Communication Horizons
All rights reserved worldwide.
No distribution without specific consent of publisher.



Home Top

 

© Copyright 2001 Communication Horizons LLC.
“NetLib” and “Encryptionizer” are Registered Trademarks of Communication Horizons.
US and international patents pending.
Updated 29 Dec 2001