I like threads like this one. I tried this out on our system. If number is a INT or DINT I must convert the DINT to a DWORD first. According the the IEC specification I can't check bits of an integer. I tried
DINT_TO_DWORD(iNumber).0
but that didn't work but I think it should. I will bug the compiler writer about this.
I had to
wNumber:=DINT_TO_DWORD(iNumber);
Then check bit 0.
wNumber.0