procedure TForm1.Button1Click(Sender: TObject); const RightWrong: array[Boolean] of String = ('falsch', 'richtig'); begin Caption := RightWrong[Edit1.Text = 'Edit1']; end;