Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- Patient = record
- surname : string[50];
- sex : string[3];
- age : integer;
- town : string[50];
- diag : string[50];
- constructor Create(sur, sex, town, diag : string; age : integer);
- begin
- self.surname := sur;
- self.sex := sex;
- self.town := town;
- self.diag := diag;
- self.age := age;
- end;
- end;
- begin
- var f : file of Patient;
- Rewrite(f, 'D:/patients.data');
- for var i := 0 to 2 do
- begin
- var p := new Patient('Петров', 'М', 'РнД', 'asd', 12);
- f.Write(p);
- end;
- Close(f);
- Reset(f, 'D:/patients.data');
- var x : Patient;
- read(f,x);
- print(x);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement