AND / OR of Numeric Values?
Posted: Sun May 18, 2025 7:19 pm
I'm trying to convert my I2C code from BBC BASIC to QL BASIC, but have hit a problem (there's probably others!)
I need to AND and OR numeric values, but in QL BASIC AND, for instance, is a comparison so always returns 1 (or 0 I guess)
Is there anyway in QL Basic to perform arithmetic AND/OR please?
e.g. L=((C*16) AND 250) OR 9, just returns 1 regardless of the value of C
Has been a long time since I used BASIC for anything other than basic stuff
Many thanks
I need to AND and OR numeric values, but in QL BASIC AND, for instance, is a comparison so always returns 1 (or 0 I guess)
Is there anyway in QL Basic to perform arithmetic AND/OR please?
e.g. L=((C*16) AND 250) OR 9, just returns 1 regardless of the value of C
Has been a long time since I used BASIC for anything other than basic stuff
Many thanks