[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
;    the internal structure of fields and aliases as they are used during
;    runtime.  
;
;       Assume that FLD is the address of the field structure.
;       The data for the field in FORCE format is at FLD[0].
;
;
;       in memory a field looks like:
;
;
;       |-------------------------------|       <--FLD[-fe_fixed_size]
;       |   fixed portion               |
;       |                               |
;       |                               |       <-- FLD[-X]
;       |-------------------------------|       <-- FLD[0]
;       |   force format data           |
;       |-------------------------------|
;       |   field name as in database   |
;       |-------------------------------|

fe_name_offset          equ     -2      ;(WORD) to get to the actual field name,
                                        ; FLD[ FLD[fe_name_offset] ]
fe_name_len             equ     -4      ;(WORD) the length of the name.
                                        ;
fe_field_type           equ     -5      ;(BYTE) the type of variable as it is 
                                        ; stored in the dbase header(C,N,M,L,D)
fe_len                  equ     -6      ;(BYTE) the length of the dbase field
                                        ; specified in field descriptor block
fe_decp                 equ     -7      ;(BYTE) the length of the decimal
                                        ;
fe_bits                 equ     -9      ;(WORD) defined below.
 fe_not_linked          equ     1       ;0 if the field is linked to the data-
                                        ; base in use. 1 if NOT linked
                                        ; ( default 1 )
 fe_not_set             equ     2       ;1 if not set, 0 if set (default 1)
 fe_ignore_imp          equ     4       ;1 if we should ignore import
 fe_dirty               equ     8       ;if the field as been set by a replace
                                        ; command or a GET to a this field.

fe_alias                equ     -11     ;(WORD) pointer back to the alias
                                        ; header. This points to AI_FLD_CNT
fe_size                 equ     -13     ;(WORD) total size in bytes of this
                                        ; record.  Use this to find the next
                                        ; field.
fe_rec_offset           equ     -15     ;(WORD) the offset in the dbase record
                                        ; of the field (figured out at USE
                                        ; time).
fe_import               equ     -19     ;(DWORD) pointer to routine to perform
                                        ; the actual dbase to field conversion.
fe_export               equ     -23     ;(DWORD) pointer to routine to perform
                                        ; the actual field to dbase conversion.

fe_frc_type             equ     -24     ;(BYTE) the force type of the field.
fe_org_len              equ     -25     ;(BYTE) original length for opening new
                                        ;  dbfs with different field sizes.
fe_org_decp             equ     -26     ;(BYTE) original decp for opening fields
                                        ; with different decimal places.

        ;---- the fixed number of bytes that the field takes up

fe_fixed_size           equ     26


;--- alias record contains information about the database.  The first
;       field immediately follows the alias.

ai_fld_cnt              equ     0       ;the number of fields in the database
                                        ; (actually the number of fields we
                                        ; have declared).
                                        
ai_header               equ     2       ;DWORD pointer to FILE HEADER BLOCK
                                        ; (see dbf.inc for structure)

ai_file_name            equ     6       ;(82 BYTES) file name of dbf to
                                        ; open

        ;--- the fixed number of bytes the alias takes up.

ai_fixed_size           equ     88      ;size of the fixed portion of the
                                        ; FIELD STRUCTURE record

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson