Модуль|unit Unit1;%L%Linterface%L%Luses%L%L  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;%L%L//const%L%Ltype%L  TForm1 = class(TForm)%L    procedure FormCreate(Sender: TObject);%L    procedure FormClose(Sender: TObject; var Action: TCloseAction);%L  private%L    { Private declarations }%L  public%L    { Public declarations }%L  end;%L%Lvar%L  Form1: TForm1;%L%Limplementation%L%L{$R *.DFM}%L%Lprocedure TForm1.FormCreate(Sender: TObject);%Lbegin%L%Lend;%L%Lprocedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);begin%L%Lend;%L%Lend.
Модуль const|unit Unit2;%L%Linterface%L%L// uses%L%Lconst%L%Limplementation%L%Lend.
Процедура|procedure TForm1.%!(Sender: TObject);%Lbegin%L%Lend;
Функция|function TForm1.%!(Sender: TObject): ;%Lbegin%L%Lend;
%SEPARATOR%|%SEPARATOR%
Операторы
	if|if %! then begin%L%Lend;
	if-else|if %!%Lthen begin%L%Lend else begin%L%Lend;
	for-to|for %! to  do begin%L%Lend;
	for-downto|for %! downto  do begin%L%Lend;
	while|while %! do begin%L%Lend;
	repeat|repeat%L%Luntil %!;
	case|case %! of%L  1: begin%L%L     end;%L  2: begin%L%L     end;%L  3: begin%L%L     end;%L  4: begin%L%L     end;%Lelse%L%Lend; //case
	try-finally|try%L%Lfinally%L%Lend;
	try-except|try%L%Lexcept%L%Lend;
%SEPARATOR%|%SEPARATOR%
Функции
	Запрос на сохранение (if)|procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);%Lvar%L  Res: integer;%Lbegin%L  CanClose := true;%L  if Modified then begin%L    Res := Application.MessageBox('Die Liste von Schüler wurde geändert.' + #10 +%L               'Möchten Sie die Änderungen speichern?',%L               'Bestätigung',%L               MB_YESNOCANCEL + MB_ICONWARNING);%L    case Res of%L      IDYES: SaveDialog1.OnClick(Sender);%L      IDNO : Cancel;%L      IDCANCEL: begin%L                  CanClose := false;%L                  Exit;%L                end;%L    end; //case%L  end; //if Modified%Lend;
	Запрос на сохранение (case)|procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);%Lbegin%L    case Application.MessageBox(PChar('Der Text in der Datei ' +%L      ExtractFileName(SaveDialog1.FileName) +%L      ' wurde verändert.' + #10 + #10 + 'Aktuelle Änderungen speichern?'), %L      'ANSI Editor', %L      MB_ICONQUESTION + MB_YESNOCANCEL + MB_DEFBUTTON1) of%L    idYes   : SaveDialog1.OnClick(Sender);%L    idNo    : ; %L    idCancel: CanClose := false; %L    end; //case%Lend;
	Max|{  function Max(a, b: integer): integer;%L%Limplementation}%L%Lfunction Max(a, b: integer): integer;%Lbegin%L  if a > b%L  then Result := a%L  else Result := b;%Lend;
Фрагменты
	Интерактивный ComboBox|{%L// Prorerty ComboBox1.Sorted = TRUE%L%L  TForm1 = class(TForm)%L…%L    procedure ComboBox1Change(Sender: TObject);%L    procedure ComboBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);%L  private%L…%L  end;%L...%Limplementation%L%L{$R *.DFM}%L}%Lprocedure TForm1.ComboBox1Change(Sender: TObject);%Lvar%L  i: Integer;%L  len: Byte;%L  myStr, cbStr: String;%Lbegin%L  if ComboBox1.Text <> '' then%L  begin%L    myStr := ComboBox1.Text;%L    for i := 0 to ComboBox1.Items.Count - 1 do%L    begin%L      len := Length(ComboBox1.Items[i])- Length(myStr);%L      cbStr := ComboBox1.Items[i];%L      Delete(cbStr, Length(myStr)+1, len);%L      if AnsiCompareText(myStr, cbStr) = 0 then%L      begin%L        ComboBox1.ItemIndex := i;%L        ComboBox1.SetFocus;%L        ComboBox1.SelStart := Length(myStr);%L        ComboBox1.SelLength := len;%L        break;%L      end else if AnsiCompareText(myStr, cbStr) < 0 then break;%L    end;%L  end;%Lend;%L%Lprocedure TForm1.ComboBox1KeyDown(Sender: TObject; var Key: Word;%L  Shift: TShiftState);%Lbegin%L  if Key = VK_DELETE then ComboBox1.Text := '';%Lend;%L
	Интерактивный ComboBox-Read only|{%L// Prorerty ComboBox1.Sorted = TRUE%L%L%L  TForm1 = class(TForm)%L…%L    procedure ComboBox1Change(Sender: TObject);%L    procedure ComboBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);%L  private%L…%L  end;%L…%Limplementation%L%L{$R *.DFM}%L}%Lprocedure TForm1.ComboBox1Change(Sender: TObject);%Lvar%L  i: Integer;%L  len: Byte;%L  myStr, cbStr: String;%Lbegin%L  if ComboBox1.Text <> '' then%L  begin%L    myStr := ComboBox1.Text;%L    for i := 0 to ComboBox1.Items.Count - 1 do%L    begin%L      len := Length(ComboBox1.Items[i])- Length(myStr);%L      cbStr := ComboBox1.Items[i];%L      Delete(cbStr, Length(myStr) + 1, len);%L      if AnsiCompareText(myStr, cbStr) = 0 then%L      begin%L        ComboBox1.ItemIndex := i;%L        ComboBox1.SetFocus;%L        ComboBox1.SelStart := Length(myStr);%L        ComboBox1.SelLength := len;%L        exit;%L      end else if AnsiCompareText(myStr, cbStr) < 0 then break;%L    end;%L    Delete(myStr, Length(myStr), 1);%L    ComboBox1.Text := myStr;%L    ComboBox1.SetFocus;%L    ComboBox1.SelStart := Length(myStr);%L  end;%Lend;%L%Lprocedure TForm1.ComboBox1KeyDown(Sender: TObject; var Key: Word;%L  Shift: TShiftState);%Lbegin%L  if Key = VK_DELETE then ComboBox1.Text := '';%Lend;%L