Я написала вот так: где у вас ... что нужно вставить?(я новичек, поэтому вопросы могут быть глупыми)
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
function Check(const User, Pass: String): Boolean;
begin
Result:=True;
if (User='админ') and (Pass='sysop') then Exit
else if (User='секретарь') and (Pass='masha') then Exit
else if (User='бухгалтер') and (Pass='nomoney') then Exit
else if (User='итд') and (Pass='anykey') then Exit
else Result:=False;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if not Check(ComboBox1.Text, Edit1.Text) then ShowMessage('Oops')
else Form2.ShowModal;
end;
end.
Админ: Пользуемся тегами для оформления кода!
И выводит ошибки:
[Error] Unit1.pas(32): Statement expected but 'FUNCTION' found
[Error] Unit1.pas(43): Identifier redeclared: 'TForm1.Button1Click'