home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5147 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  890 b 

  1. Path: sparky!uunet!haven.umd.edu!mimsy!afterlife!adm!news
  2. From: zbych@halina.univ.gda.pl
  3. Newsgroups: comp.lang.pascal
  4. Subject: (none)
  5. Message-ID: <32298@adm.brl.mil>
  6. Date: 1 Sep 92 11:28:41 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 24
  9.  
  10. In my opinion the solution of your problem is:
  11.   var
  12.     I : Integer;
  13.     CheckBoxResult : Word;
  14.     BitIsSet : Array[0..15] of Boolean;
  15.   begin
  16.     {get CheckBoxResult from user}
  17.     for I := 0 to 15 do
  18.       if CheckBoxResult AND (1 shl I) = (1 shl I) then BitIsSet[I] := True
  19.       else BitIsSet[I] := False;
  20.   end;
  21.  
  22. >As I understand TP instructions, this code should return the boolean equivalent 
  23. >of the binary value of CheckBoxResult. But it does not work! 
  24. >What am I doing wrong?
  25. >                        Oscar
  26.  
  27. Your expression returns word not boolean.
  28.  
  29.  
  30.        Zbyszek Ruszczyk
  31.        Computer Center
  32.        University of Gdansk
  33.        zbych@halina.univ.gda.pl
  34.