Metaediter v5 build 2375 bug?

 

Hello,

I have the following code:

      if(upper_cond
         && bands.bbl_0 == bands.bbl_1
         && (bands.bbl_0 == upper || bands.bbl_0 == lower))
        {
         break;
        }

Where upper_cond = bool, bands.bbl_0 & bands.bbl_1 are double struct members, and upper & lower are doubles.

When I compile I'm getting the following error on the second == (i.e. bands.bbl_0 == lower) which doesn't seem normal as I believe the code is correct.


Any ideas how I should get over this problem please?

Thanks

 
imamushroom:

Hello,

I have the following code:

Where upper_cond = bool, bands.bbl_0 & bands.bbl_1 are double struct members, and upper & lower are doubles.

When I compile I'm getting the following error on the second == (i.e. bands.bbl_0 == lower) which doesn't seem normal as I believe the code is correct.


Any ideas how I should get over this problem please?

Thanks

I would try following first.


if(upper_cond
         && (bands.bbl_0 == bands.bbl_1)
         && ((bands.bbl_0 == upper) || (bands.bbl_0 == lower)))
        {
         break;
        }
 
Soewono Effendi:
I would try following first.


Just the same thing with this modification.

Reason: