package dbase4
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Dbase4.BaseSource
type dbf_file = {name : string;(*name of table (.dbf)
*)fin : in_channel;(*opened i/o stream for dbf file
*)memo : in_channel option;(*optional i/o stream for memo file - if exists
*)info : dbf_info;(*description of DBF table
*)cri : int;(*Current Rider Index - ID of current record in the table
*)
}DBF file handle
and dbf_info = {version : int;(*version of the file format
*)mdate : date;(*modification date
*)num_records : int;(*number of records
*)hdr_size : int;(*file header size (in bytes)
*)rec_size : int;(*file record size (in bytes)
*)fields : dbf_field_descriptor array;(*fields descriptors
*)
}descriptor of the internal dbf file layout
primitive structure to hold date
and dbf_field_descriptor = {name : string;(*name of field
*)ftype : dbf_data_type;(*DBF data type
*)faddr : int;(*address of field - it's using as offset in the raw record
*)flen : int;(*length of field
*)fdec : int;(*number after point for number data type
*)work_area_id : int;(*reserved
*)flags : int;(*some flags (not used)
*)
}DBF field descriptor
internal DBF data type
Exception means: internal data representation is invalid
move cursor to the record after n-th records from the current, relative
make an iterartor over all existed (not deleted) records
FOR INTERNAL USE ONLY - translate binary ASCIIZ-string
FOR INTERNAL USE ONLY - read chunk of data from the file