Re: Converting .dat files to Paradox
Posted in 1993
Topics: General Discussion
graeme@pyra.co.uk (Graeme Sargent) writes: >When DECIMALTYPE numbers are stored in files, they are compressed or >packed, as: > First byte: > top 1 bit is the sign of the number > on = positive > off = negative > low 7 bits are the exponent in excess 64 format > Remaining bytes: > base 100 digits (in 100 complement format for negative numbers) >The length in bytes of the packed DECIMALTYPE Number is 1 plus the >number of base 100 digits. It can vary from 2 to 17 bytes. Zero is >represented as 80,00,00,... (hex). I don't know what NULL looks like >(00,00,00,... ???). My zeroes are C0,00,00,00. >Each byte holds 2 digits, located to the right or left of the decimal >point. You cannot store a significant digit to the left of the decimal >point in the same byte as a digit to the right of the decimal point. >The decimal point is implied; it is not physically present in the data >record. For a MONEY datatype (assuming you are not dealing with >multi-currency) it is a fair bet that the scale factor is 2 (default). Why then are some bytes 0A or 2B? What digit is "A"? Thanks for your help. Here's an example entry: C2 04 3D 00 00 00 00 00 00 Any ideas why this is different from what you had? Thanks again. -------------------OS/2 v2.1--- Why settle for anything less?----------------- James C. Barrett (barrett@cc.gatech.edu)| Atlanta Braves - 1991 and 1992 Georgia Tech College of Computing | World Outdoor Baseball Champs!!