Zrobilem taka funkcje.... Troche tepa ale coz... Dziala prawie dobrze...
// funkcja sprawdza poprawnosc wpisanego loginu //
function SprawdzLogin(l:string):boolean;
var i:integer;
begin
if l='' then SprawdzLogin:=false;
for i:=1 to length(l) do
begin
if ((l[i]<>'a') and (l[i]<>'b') and (l[i]<>'c') and (l[i]<>'d') and (l[i]<>'e') and (l[i]<>'f') and (l[i]<>'g') and (l[i]<>'h') and (l[i]<>'i') and (l[i]<>'j') and (l[i]<>'k') and (l[i]<>'l') and (l[i]<>'m') and (l[i]<>'n') and (l[i]<>'o') and (l[i]<>'p') and (l[i]<>'q') and (l[i]<>'r') and (l[i]<>'s') and (l[i]<>'t') and (l[i]<>'u') and (l[i]<>'w') and (l[i]<>'x') and (l[i]<>'y') and (l[i]<>'z'))
then SprawdzLogin:=false
else SprawdzLogin:=true
end;
end;
Po wpisaniu np. "asd12asdgq" zwraca wartosc false, po wpisaniu np. "asdb" zwraca wartosc true.. i o to mi chodzilo,
jednak czemu po wpisaniu np. "asd asd" (ze spacja) rowniez zwraca wartosc true?