logical operator question--"and"


[ DelphiLand FAQ ]

Posted by murphy on November 25, 2004 at 09:13:40:

my code is:

if (copy(sr.name,18,3)<>'CGL') and (copy(sr.name,1,3)<>'233') then continue;
but it doesn't work!:(
if I change the code to two If statements,it works. why?

Is there any problem with the "and" operator?
the two if statements:

if copy(sr.name,18,3)<>'CGL' then continue;
if copy(sr.name,1,3)<> '233' then continue


Related Articles and Replies


[ Delphi Forum -- by DelphiLand ]