Fórum Duvidas sobre if com copy #547582
03/03/2016
0
A primeira parte eu entendo somente a segunda parte após o AND
if (Length(edCodigo.Text) = 13) and (Copy(edCodigo.Text, 1, 1) = '2') then
Wesley Kowalski
Curtir tópico
+ 0Posts
03/03/2016
Raimundo Pereira
(Copy(edCodigo.Text, 1, 1) = '2') Verifica se o primeiro digito é =2
Gostei + 0
03/03/2016
Rafael Bosco
var
Codigo: String;
begin
Codigo := edCodigo.text;
if (Length(Codigo) = 13) and (Codigo.StartsWith('2') then
// faz algo
end;
Gostei + 0
04/03/2016
Marco Antônio
var
Codigo: String;
begin
Codigo := edCodigo.text;
if (Length(Codigo) = 13) and (Codigo.StartsWith('2') then
// faz algo
end;
pode ser tb
if (Length(Codigo) = 13) and (Codigo[1] = '2' ) then
// faz algo
opções não faltam.
Abc.
Gostei + 0
08/03/2016
Wesley Kowalski
Gostei + 0
08/03/2016
Wesley Kowalski
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)