Booleans
Posted: Tue Apr 19, 2011 7:00 pm
Booleans are true or false. Depending on the programm used true and false does have different values, like 1 and 0 or 0 and -1.
In Flowcode true=1 and false=0. Say Flag is a boolean (byte with only one bit used) and the next calculation is correct:
Flag = (1 and 1)
The following if-statement: If Flag=1 ? can also written as If Flag ? and works correct in Flowcode.
My question is do both if statement give the same results in a PIC-microcontroller (after translation into C , assembler and hex)?
Kind regards
Jan Lichtenbelt
In Flowcode true=1 and false=0. Say Flag is a boolean (byte with only one bit used) and the next calculation is correct:
Flag = (1 and 1)
The following if-statement: If Flag=1 ? can also written as If Flag ? and works correct in Flowcode.
My question is do both if statement give the same results in a PIC-microcontroller (after translation into C , assembler and hex)?
Kind regards
Jan Lichtenbelt