func (db *DBaseFile) readFieldHeaders() (err error) {
	err = db.checkOffset(db.offsets.mainHeaderEnd, `starting to read field descriptions`)
	if err != nil {
		return err
	}

	rawf := make([]rawFieldDescriptor, db.Header.FieldCount)
	err = binary.Read(db.r, binary.LittleEndian, &rawf)
	if err != nil {
		return err
	}

	err = db.checkOffset(db.offsets.fieldEnd, `after reading field descriptions`)
	if err != nil {
		return err
	}

	// Build proper fields
	for _, f := range rawf {
		db.FieldDescriptors = append(db.FieldDescriptors, FieldDescriptor{
			Name:         strings.TrimRight(string(f.Name[:]), "\x00"),
			Type:         f.Type,
			Length:       int(f.Length),
			DecimalCount: int(f.DecimalCount), // for floats
			WorkAreaID:   f.WorkAreaID,
			//MdxFlag:      f.MdxFlag,
		})
	}

	return nil
}
// Read raw Fields for descriptions after main header
Read raw Fields for descriptions after main header
// Read raw Fields for descriptions after main header
func (db *DBaseFile) readFieldHeaders() (err error) {
	err = db.checkOffset(db.offsets.mainHeaderEnd, `starting to read field descriptions`)
	if err != nil {
		return err
	}
	rawf := make([]rawFieldDescriptor, db.Header.FieldCount)
	err = binary.Read(db.r, binary.LittleEndian, &rawf)
	if err != nil {
		return err
	}
	err = db.checkOffset(db.offsets.fieldEnd, `after reading field descriptions`)
	if err != nil {
		return err
	}
	for _, f := range rawf {
		db.FieldDescriptors = append(db.FieldDescriptors, FieldDescriptor{
			Name:         strings.TrimRight(string(f.Name[:]), "\x00"),
			Type:         f.Type,
			Length:       int(f.Length),
			DecimalCount: int(f.DecimalCount), 
			WorkAreaID:   f.WorkAreaID,
		})
	}
	return nil
}
func ( db * DBaseFile ) readFieldHeaders ( ) ( err error ) { err = db . checkOffset ( db . offsets . mainHeaderEnd , `starting to read field descriptions` ) if err != nil { return err } rawf := make ( [ ] rawFieldDescriptor , db . Header . FieldCount ) err = binary . Read ( db . r , binary . LittleEndian , & rawf ) if err != nil { return err } err = db . checkOffset ( db . offsets . fieldEnd , `after reading field descriptions` ) if err != nil { return err } for _ , f := range rawf { db . FieldDescriptors = append ( db . FieldDescriptors , FieldDescriptor { Name : strings . TrimRight ( string ( f . Name [ : ] ) , " \x00 " ) , Type : f . Type , Length : int ( f . Length ) , DecimalCount : int ( f . DecimalCount ) , WorkAreaID : f . WorkAreaID , } ) } return nil }
Read raw Fields for descriptions after main header
Read raw Fields for descriptions after main header
// Build proper fields // for floats //MdxFlag:      f.MdxFlag,