Inverting a bool inconsistent using NOT (Flowcode 7)
Posted: Tue Dec 27, 2022 4:51 pm
If a boolean variable e.g. LtoR is inverted using NOT function
e.g. LtoR = NOT(LtoR)
then it works in a simulated decision but the generated code
uses bitwise inversion (~) and the resulting value is not equivalent
to false.
CODE GENERATED:
// Flip direction
// Calculation:
// LtoR = NOT (LtoR)
FCV_LTOR = ~(FCV_LTOR)
e.g. LtoR = NOT(LtoR)
then it works in a simulated decision but the generated code
uses bitwise inversion (~) and the resulting value is not equivalent
to false.
CODE GENERATED:
// Flip direction
// Calculation:
// LtoR = NOT (LtoR)
FCV_LTOR = ~(FCV_LTOR)