Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- TPatient = record
- Surname: string[20];
- Sex: Char;
- Age: Byte;
- Diagnosis: string[20];
- City: string[20];
- end;
- var
- Patient: TPatient;
- Patient.Surname := 'Хромов';
- Patient.Sex := 'М';
- Patient.Age := 35;
- Patient.Diagnosis := 'Перелом ноги';
- Patient.City := 'Минск';
- with Patient do
- begin
- Surname := 'Хромов';
- Sex := 'М';
- Age := 35;
- Diagnosis := 'Перелом ноги';
- City := 'Минск';
- end;
- var
- ArrOfPatients: array of TPatient;
- for I := 0 to High(ArrOfPatients) do
- begin
- Writeln(ArrOfPatients[I].Surname);
- Writeln(ArrOfPatients[I].Sex);
- Writeln(ArrOfPatients[I].Age);
- Writeln(ArrOfPatients[I].City);
- Writeln(ArrOfPatients[I].Diagnosis);
- end;
- function InputAmount(): Integer; forward;
- procedure InputData(var People: TPeople); forward;
- function FindEldest(People: TPeople): TPeople; forward;
- procedure ShowPeople(People: TPeople); forward;
- type
- TypeAuto = (Cargo, Passenger);
- TAuto = record
- Country: string[20];
- Brand: string[20];
- case Type: TypeAuto of
- Cargo: (CarryingСapacity: Integer;);
- Passenger: (NumOfPassengers: Integer;);
- end;
- var
- Auto, AutoCarg: TAuto;
- begin
- Auto.Country := 'Германия';
- Auto.Brand := 'Мерседес';
- Auto.Type := Passenger;
- Auto.NumOfPassengers := 3;
- AutoCarg.Country := 'Беларусь';
- AutoCarg.Brand := 'МАЗ';
- AutoCarg.Type := Cargo;
- AutoCarg.CarryingСapacity := 15;
- end.
Add Comment
Please, Sign In to add comment