home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5122 < prev    next >
Encoding:
Text File  |  1992-08-31  |  787 b   |  22 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!cs.utexas.edu!torn!news.ccs.queensu.ca!slip02.telnet1.QueensU.CA!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: reading Bit mapped fields
  5. Message-ID: <dmurdoch.48.0@mast.queensu.ca>
  6. Lines: 10
  7. Sender: news@knot.ccs.queensu.ca (Netnews control)
  8. Organization: Queen's University
  9. References: <1992Aug31.094135.245@lincoln.ac.nz> <1992Aug31.094457.9196@kth.se>
  10. Date: Mon, 31 Aug 1992 12:20:24 GMT
  11.  
  12. In article <1992Aug31.094457.9196@kth.se> kjell@elixir.e.kth.se (Kjell Rilbe) writes:
  13. >BEGIN
  14. >  FOR I:=0 TO 15 DO
  15. >    BitIsSet[I]:=(CheckBoxResult AND (2 SHL I) > 0);
  16. >END.
  17.  
  18. That should be "1 SHL I" for the usual bit numbering.  Yours misses the
  19. least significant bit, and numbers the others from 0 to 14.
  20.  
  21. Duncan Murdoch
  22.