Tranquilo, cara a funcao nem é minha.
heheh,
2006/11/30, Leonardo Quinino [EMAIL PROTECTED]:
procedure valida_cpf ;
var x : integer;
begin
for x := 1 to 11 do
begin
if cpf = replicate( ord(x) ,11) ) then
begin
ShowMessage('CPF Inválido');
Exit;
end;
end;
Em 30/11/06, Rodrigo
if (cpf '000')and(cpf '111')and(cpf '222')
and(cpf '333')and(cpf '444')and(cpf '555')
and(cpf '666')and(cpf '777')and(cpf '888')
and(cpf '999')then
galera tenho uma validação de CPF e tive que
Function Occurs(T, S : ShortString) : Byte;
Var
P : Byte;
Begin
Result := 0;
P := Pos (T, S);
while P 0 do
begin
Inc (Result);
S := Copy (S, P + Length (T), 255);
P := Pos (T, S);
end;
End;
Essa funcao identifica quantas ocorrecias de um caracter há em uma string,
Desculpe nao postar a fonte
@yahoogrupos.com.br
Assunto: [delphi-br] Validação mais inteligente
if (cpf '000')and(cpf '111')and(cpf '222')
and(cpf '333')and(cpf '444')and(cpf '555')
and(cpf '666')and(cpf '777')and(cpf '888')
and(cpf '999
To: delphi-br@yahoogrupos.com.br
Sent: Thursday, November 30, 2006 3:41 PM
Subject: Re: [delphi-br] Validação mais inteligente
Function Occurs(T, S : ShortString) : Byte;
Var
P : Byte;
Begin
Result := 0;
P := Pos (T, S);
while P 0 do
begin
Inc (Result);
S := Copy (S, P
procedure valida_cpf ;
var x : integer;
begin
for x := 1 to 11 do
begin
if cpf = replicate( ord(x) ,11) ) then
begin
ShowMessage('CPF Inválido');
Exit;
end;
end;
Em 30/11/06, Rodrigo [EMAIL PROTECTED] escreveu:
if (cpf '000')and(cpf '111')and(cpf
6 matches
Mail list logo