How to control if a double variable is between two values

Hello,

I hope someone can help me out.

I need to control if a double variable is between two values, more precisely, i have to check :
if -0.05 < my dbl_var < 0.05

my dbl_var is the result of two double variables
I assign dbl_ctrl = Price1-Price2
The difference has to be between -0.05 and 0.05

When I use a Flow decision, when I wrote :
-0.05< dbl_ctrl < 0.05 => I have an alert(Option strict on) that I cannot convert implicitely from boolean to double.

Can someone see how can I fix this please ?

Thanks

You need to compare each one separately. Change the flow decision to be:

-.05 < dbl_ctrl AndAlso dbl_ctrl < .05

1 Like

thank you, it works !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.