home *** CD-ROM | disk | FTP | other *** search
- (******************************************************************************)
- (* ALLFIX sample procedures *)
- (* Copyright (C) 1992,98 Harms Software Engineering, all rights reserved *)
- (* *)
- (* All information in this documentation is *)
- (* subject to change without prior notice *)
- (******************************************************************************)
-
- Uses Types;
-
- Procedure ReadFileAreas;
-
- (* This procedure demonstrates how to read in the FILEAREA.FIX file *)
-
- (* Please note that it is very important to set the record size to 1, *)
- (* since this file has two different record sizes in it *)
-
- Var f : file;
- {$IFDEF OS2}
- Nr : longint;
- {$ELSE}
- Nr : word;
- {$ENDIF}
- Header : FileAreaHeader;
- Rec : FileAreaRecord;
-
- Begin
- WriteLn('Reading FILEAREA.FIX');
-
- Assign(f, 'FILEAREA.FIX');
- Reset(f,1);
-
- Blockread(f, Header, Sizeof(Header), Nr);
- Blockread(f, Rec, Sizeof(Rec), Nr);
- While Nr > 0 Do
- Begin
- WriteLn(Rec.Name);
- Blockread(f, Rec, Sizeof(Rec), Nr);
- End;
-
- Close(f);
- End;
-
- Begin
- ReadFileAreas;
- End.
-