Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Float double and currency

Status
Not open for further replies.

rob444

Programmer
Nov 5, 2002
633
NL
I'm writing a data recovery program in foxpro.
This program will be posted on this forum in a faq.

I still do need some info on the following specific data types:

Float
Double
Currency

Does anyone have any information on how it is stored in a foxpro table?
If so would you share it with me?

Thanks,
Rob.

NoCure at hccnet dot nl

 
HI

1. Float type is included for compatibility reasons.
Float data type is functionally equivalent to Numeric.
Numeric are stored as 1 to 20 bytes in table.
Range: - .9999999999E+19 to .9999999999E+20

2. Double is a double-precision floating-point number.
8 bytes in field, but stores real values in the field.
Range : +/-4.94065645841247E-324
to +/-8.9884656743115E307

3. Currency - 8 bytes
Range -$922337203685477.5807 to $922337203685477.5807
Stored with 4 decimal places.

VARTYPE(myField) will show..
N for Numeric, Integer, Float, or Double
Y for Currency


:)


____________________________________________
Ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Ramani,

Thanks, I knew that, but how are the bytes in the dbf to be interpreted if you have a double precision floating point number?

Dito for the Currency type....

I could use C/C++ or C# to read the double precision fp nr, but I want to do it with vfp code.

Rob.
 
Ramani,

I mean low level access to the dbf (mostly damaged) to save the data in the dbf file.
If the dbf has Currency fields and or Double fields I want to restore those values to a csv file so I have to write a routine to convert those binary values to asci values.

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top