[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Kyan Pascal question
- Subject: Kyan Pascal question
- From: "Guillaume Tello" <houten.van@wanadoo.fr>
- Date: Sat, 8 Jul 2006 07:59:08 +0200
- Newsgroups: comp.sys.apple2
- Organization: les newsgroups par Orange
- Xref: g2news2.google.com comp.sys.apple2:10158
Hello,
I want to test individual bits into an integer, for example, bit 3 in A
with:
var
A,B:integer;
begin
B:=A and 8;
...
And I expect, if A=12 to get B=8 and if A=7, to get B=0.
But, this doesn't work. Are those operators (OR, AND, NOT) reserved for
boolean values?
So I have to do it in ASM... It's not a problem, but I just wanted to know
if I get it right or if I'm missing something.
Other question (for another solution), if I declare:
A : ARRAY [1..16] of boolean;
will this be packed into a 2 byte integer or into a 16 bytes array? (a
question of memory usage)
Thanks a lot!
Guillaume.