Add an if with 2 conditions [closed]

4

I have the following declared variables:

n_var:= strtoint (En_var.Text);
n_raster := strtoint (En_raster.Text);

And I would like you to make a condition by comparing their values for example:

if (En_var.Text = (inttostr(3)) and (En_raster.text = (inttostr(1))))  then

but I get the following error message:

  

[dcc32 Error] Urecomendacao.pas (117): E2010 Incompatible types:   'string' and 'Boolean'

If I do this normally without the AND it works, for example:

if (En_var.Text = (inttostr(3)))  then

What is the cause of this?

    
asked by anonymous 30.09.2015 / 16:25

1 answer

6

There was one left over in his comparison:

change your code to this:

if (En_var.Text = inttostr(3)) and  (En_raster.text = inttostr(1)) then
    
30.09.2015 / 16:28