program MyRecordDemo3;

uses
 Forms;

type
 AddressType = record
  Street: String[50];
  City: String[20];
 end;

 PersonType = record
  FirstName: String[10];
  LastName: String[20];
  HomeAddress: AddressType;
  WorkAddress: AddressType;
 end;


var
 Person: PersonType;

begin
 with Person do
 begin
  FirstName := 'Don';
  LastName := 'Osier';
 end;

 with Person.HomeAddress do
 begin
  Street := '1414 Your St.';
  City := 'MyTown';
 end;

 with Person.WorkAddress do
 begin
  Street := '14 Big Business Road';
  City := 'NoOzone';
 end;

 with Person do
 begin
  Writeln(FirstName);
  Writeln(LastName);
 end;

 with Person.HomeAddress do
 begin
  Writeln(Street);
  Writeln(City);
 end;

 with Person.WorkAddress do
 begin
  Writeln(Street);
  Writeln(City);
 end;

 Readln;
end.
