if imbriqué impossible /!\ string et boolean
bonjour, mon if ne passe pas et je ne sais pas comment régler ce pb :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| if ( Memo1.Lines.Strings[0] < IntToStr(256)) and (Memo1.Lines.Strings[0] > IntToStr(0))
and (Memo1.Lines.Strings[1] < IntToStr(256) and (Memo1.Lines.Strings[1] >= IntToStr(0))
and (Memo1.Lines.Strings[2] < IntToStr(256) and (Memo1.Lines.Strings[2] >= IntToStr(0))
and (Memo1.Lines.Strings[3] < IntToStr(256) and (Memo1.Lines.Strings[3] > IntToStr(0)) then
begin
(Sender as TEdit).Color := clWhite;
BitBtn1.Enabled := true;
end
else
begin
(Sender as TEdit).Color := clRed;
BitBtn1.Enabled := false;
end; |
et je reçois ces erreurs :
Code:
1 2 3
| [Erreur] Unit2.pas(662): Types incompatibles : 'String' et 'Boolean'
[Erreur] Unit2.pas(663): Types incompatibles : 'String' et 'Boolean'
[Erreur] Unit2.pas(663): Types incompatibles : 'String' et 'Boolean' |
why??? 8O 8O