home *** CD-ROM | disk | FTP | other *** search
- unit Hlth_Unt;
-
- interface
- uses
- GS_dBase, GS_DB_FL;
-
- type
- Hlth_Unt_FL001 = Object(GS_dBase_FL_I) {FOOD_CODE }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL002 = Object(GS_dBase_FL_C) {FOOD }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL003 = Object(GS_dBase_FL_R) {QUANTITY }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL004 = Object(GS_dBase_FL_C) {UNITTYPE }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL005 = Object(GS_dBase_FL_R) {CALS }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL006 = Object(GS_dBase_FL_I) {TOT_FAT_G }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL007 = Object(GS_dBase_FL_I) {SAT_FAT_G }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL008 = Object(GS_dBase_FL_I) {CHOLES_MG }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_FL009 = Object(GS_dBase_FL_M) {COMMENTS }
- constructor Init(LF, LR : pointer);
- end;
-
- Hlth_Unt_Objct = Object(GS_dBase_DB)
- FOOD_CODE : Hlth_Unt_FL001;
- FOOD : Hlth_Unt_FL002;
- QUANTITY : Hlth_Unt_FL003;
- UNITTYPE : Hlth_Unt_FL004;
- CALS : Hlth_Unt_FL005;
- TOT_FAT_G : Hlth_Unt_FL006;
- SAT_FAT_G : Hlth_Unt_FL007;
- CHOLES_MG : Hlth_Unt_FL008;
- COMMENTS : Hlth_Unt_FL009;
- end;
-
- var
- Hlth_Unt_R : Hlth_Unt_Objct;
- Hlth_Unt_Exit : pointer;
-
- implementation
-
- type
- PtrRec = record
- ofs, seg : word;
- end;
-
- constructor Hlth_Unt_FL001.Init(LF, LR : pointer);
- begin
- OffSet := 1;
- Inc(PtrRec(LF).ofs,0);
- Inc(PtrRec(LR).ofs,1);
- GS_dBase_FL_I.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL002.Init(LF, LR : pointer);
- begin
- OffSet := 6;
- Inc(PtrRec(LF).ofs,32);
- Inc(PtrRec(LR).ofs,6);
- GS_dBase_FL_C.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL003.Init(LF, LR : pointer);
- begin
- OffSet := 26;
- Inc(PtrRec(LF).ofs,64);
- Inc(PtrRec(LR).ofs,26);
- GS_dBase_FL_R.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL004.Init(LF, LR : pointer);
- begin
- OffSet := 31;
- Inc(PtrRec(LF).ofs,96);
- Inc(PtrRec(LR).ofs,31);
- GS_dBase_FL_C.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL005.Init(LF, LR : pointer);
- begin
- OffSet := 33;
- Inc(PtrRec(LF).ofs,128);
- Inc(PtrRec(LR).ofs,33);
- GS_dBase_FL_R.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL006.Init(LF, LR : pointer);
- begin
- OffSet := 39;
- Inc(PtrRec(LF).ofs,160);
- Inc(PtrRec(LR).ofs,39);
- GS_dBase_FL_I.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL007.Init(LF, LR : pointer);
- begin
- OffSet := 42;
- Inc(PtrRec(LF).ofs,192);
- Inc(PtrRec(LR).ofs,42);
- GS_dBase_FL_I.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL008.Init(LF, LR : pointer);
- begin
- OffSet := 45;
- Inc(PtrRec(LF).ofs,224);
- Inc(PtrRec(LR).ofs,45);
- GS_dBase_FL_I.Init(LF, LR);
- end;
-
- constructor Hlth_Unt_FL009.Init(LF, LR : pointer);
- begin
- OffSet := 49;
- Inc(PtrRec(LF).ofs,256);
- Inc(PtrRec(LR).ofs,49);
- GS_dBase_FL_M.Init(LF, LR);
- File_ptr := @Hlth_Unt_R.mFile;
- end;
-
- {$F+}
- procedure Exit_Proc;
- begin
- Hlth_Unt_R.Close;
- exitProc := Hlth_Unt_Exit;
- end;
-
- begin
- Hlth_Unt_Exit := exitProc;
- exitProc := @Exit_Proc;
- Hlth_Unt_R.Init('Health');
- with Hlth_Unt_R do
- begin
- FOOD_CODE.Init(Fields, CurRecord);
- FOOD.Init(Fields, CurRecord);
- QUANTITY.Init(Fields, CurRecord);
- UNITTYPE.Init(Fields, CurRecord);
- CALS.Init(Fields, CurRecord);
- TOT_FAT_G.Init(Fields, CurRecord);
- SAT_FAT_G.Init(Fields, CurRecord);
- CHOLES_MG.Init(Fields, CurRecord);
- COMMENTS.Init(Fields, CurRecord);
- end;
- Hlth_Unt_R.Close;
- end.
-