> function TForm1.test( b : BYTE ) : BOOLEAN; > begin > if b in [1,2,4,8,16,32,64,128] then > test := TRUE > else > test := FALSE; > end;
I can't see this working. I needed a function to establish whether a bit is true or false. b could be 5 so bit 1 and bit 3 are true and the others are false. I have a function from a previous reply. Thanks. Ross. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

