{
StrCopy, StrCat example
The following example uses an edit control, a label, and a button on a form. When the button is clicked, the label’s caption and the edit control’s text are combined in a buffer. Then the buffer is displayed in the label’s caption.
} 
procedure TForm1.Button1Click(Sender: TObject);
var
  Buffer: PChar;
begin
  GetMem(Buffer,Length(Label1.Caption) + Length(Edit1.Text) + 1);
  StrCopy(Buffer, PChar(Label1.Caption));
  StrCat(Buffer, PChar(Edit1.Text));
  Label1.Caption := Buffer;
  Edit1.Clear;
  FreeMem(Buffer);
end; 
