StrComp的用法
为什么下面的代码会出现not allowed before 'ELSE'的错误????请不吝赐教~~~
var
UserName,Password : string;
Result1,Result2:integer;
begin
UserName:='superghost';
Password:='123456';
Result1:=StrComp(PChar(UserName),PChar(Edit1.Text));
Result2:=StrComp(PChar(Password),PChar(Edit2.Text));
if Result1 = 0 then
MessageDlg('You can enter!',mtInformation,[mbOk],0);
else
MessageDlg('Please check the username and the password.',mtInformation,[mbOk],0);
end;