                                (* Chapter 7 - Program 3 *)
program What_Is_In_A_String;

var First_Name   : string[10];
    Initial      : char;
    Last_Name    : string[12];
    Full_Name    : string[25];
    Index,Total  : integer;

begin  (* main program *)
   First_Name := 'John';
   Initial := 'Q';
   Last_Name := 'Doe';
   Writeln(First_Name,Initial,Last_Name);
   Full_Name := First_Name + ' ' + Initial + ' ' + Last_Name;
   Writeln(Full_Name);

   Total := Length(Full_Name);
   Writeln('The string contains ',Total:4,' characters');
   for Index := 1 to Length(Full_Name) do
      Writeln(Full_Name[Index]);
   Writeln('End of program');
end.  (* main program *)




{ Result of execution

JohnQDoe
John Q Doe
The string contains   10 characters
J
o
h
n

Q

D
o
e
End of program

}
