home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!mimsy!afterlife!adm!news
- From: zbych@halina.univ.gda.pl
- Newsgroups: comp.lang.pascal
- Subject: (none)
- Message-ID: <32298@adm.brl.mil>
- Date: 1 Sep 92 11:28:41 GMT
- Sender: news@adm.brl.mil
- Lines: 24
-
- In my opinion the solution of your problem is:
- var
- I : Integer;
- CheckBoxResult : Word;
- BitIsSet : Array[0..15] of Boolean;
- begin
- {get CheckBoxResult from user}
- for I := 0 to 15 do
- if CheckBoxResult AND (1 shl I) = (1 shl I) then BitIsSet[I] := True
- else BitIsSet[I] := False;
- end;
-
- >As I understand TP instructions, this code should return the boolean equivalent
- >of the binary value of CheckBoxResult. But it does not work!
- >What am I doing wrong?
- > Oscar
-
- Your expression returns word not boolean.
-
-
- Zbyszek Ruszczyk
- Computer Center
- University of Gdansk
- zbych@halina.univ.gda.pl
-