Boolean issue or assignment issue?
Maybe this is just a quiz that I've failed.
why would this:
cause the variable max_price to result in -1 (true)
but this:
works as expected without modifying max_price?
correct me if I'm wrong but >= is not assignment right?
why would this:
if (price_filled_flags == $3FFFFFF) AND ( max_price >= Prices[25])
OUTA[_AC_RELAY] := _ON
OUTA[_FAN_RELAY] := _ON
waitcnt(clkfreq/100 + cnt)
OUTA[_FAN_RELAY] := (_OFF | force_relay2)
IF debug_flag == 1
PST.str(string("Relay ON max = "))
PST.dec(max_price)
PST.char(13)
cause the variable max_price to result in -1 (true)
but this:
if (price_filled_flags == $3FFFFFF) AND ( max_price > Prices[25])
OUTA[_AC_RELAY] := _ON
OUTA[_FAN_RELAY] := _ON
waitcnt(clkfreq/100 + cnt)
OUTA[_FAN_RELAY] := (_OFF | force_relay2)
IF debug_flag == 1
PST.str(string("Relay ON max = "))
PST.dec(max_price)
PST.char(13)
works as expected without modifying max_price?
correct me if I'm wrong but >= is not assignment right?

Comments
looking at Boolean AND in the prop manual
Wrong. You want "=>". Just about any operator ending with "=" is an assignment.
I was thinking left = was assignment.