Programs to Debug: Number 2

We suggest that you inspect this program to see if you can spot the errors before attempting to compile it in Delphi or Lazarus. Make the necessary changes so that each program will compile and achieve the stated purpose. Our pages on common programming errors may help you.

program Greeting2;
{$APPTYPE CONSOLE}
{This program should give the user a personalized greeting.
There are two deliberate errors.}
uses
  SysUtils;
var
  Surname, Title, GreetingName  : string;
begin
  write('Please enter your surname. ');
  readln(Surname);
  write('Please enter your title (Mr, Miss, Ms etc.) ');
  readln(Title);
  GreetingName = Title + ' ' + Surname;
  writeln( "Hello, ", GreetingName);
  readln;
end.
Programming - a skill for life!

Spot the deliberate errors