******************************************************************************

This decoding of the DAT format has been made on an reverse-engineering
basis and is in no way complete. You are very likely to find more details. If
so please let me know and I shall update this description.


Uffe Kousgaard
Roskilde, Denmark
E-mail: ufk@dmu.dk

12-May-1999

******************************************************************************

Position
in file : Description

      0 : Unknown (3)
      1 : Unknown (99)
      2 : Unknown (5)
      3 : Unknown (11/12)
  4-  7 : No of records (r)                      (low/hi1/hi2/hi3)
          (incl. deleted records)
  8-  9 : Starting position for 1. record (n)    (low/hi)
 10- 11 : Record length (l)                      (low/hi)

 32- 41 : Field name
 43     : Field type  C = Character       String
                      C = Integer/date    Longint
                      C = Small integer   Word
                      C = Float           Double 
                      N = Decimal         String
                      L = Logical         0/1

 48     : Field width ?? = Character
                       4 = Integer/Date
                       2 = Small integer
                       8 = Float
                      ?? = Decimal
                       1 = Logical

 49     : No of decimals in field type N

 64     : Next field name

 .
 .

 n-1    : End code for field descriptions (13)

 n      : 32 = record OK, 42 = record deleted

 n+1    : Actual data
  .
  .
 n+l-1

 n+l    : Next record

 n+l*r  : End code for records (26)


******************************************************************************

Notes:

It doesn't seem as if index'es on fields can be seen in the DAT-file.

Byte 0 is probably the MapInfo format version (3.0)

It is not possible to distinguish between integer and date format in the
DAT-file. You will have to look into the TAB-file.

The decimal type is coded using '.' regardless of windows setting.

