home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!mcsun!sunic!kth.se!kjell
- From: kjell@elixir.e.kth.se (Kjell Rilbe)
- Subject: Re: reading Bit mapped fields
- Message-ID: <1992Aug31.151145.13188@kth.se>
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: elixir.e.kth.se
- Organization: Dept. of EE, Royal Institute of Technology, Stockholm, Sweden
- References: <1992Aug31.094135.245@lincoln.ac.nz> <1992Aug31.094457.9196@kth.se> <dmurdoch.48.0@mast.queensu.ca>
- Date: Mon, 31 Aug 1992 15:11:45 GMT
- Lines: 20
-
- In article <dmurdoch.48.0@mast.queensu.ca> dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
- >In article <1992Aug31.094457.9196@kth.se> kjell@elixir.e.kth.se (Kjell Rilbe) writes:
- >>BEGIN
- >> FOR I:=0 TO 15 DO
- >> BitIsSet[I]:=(CheckBoxResult AND (2 SHL I) > 0);
- >>END.
- >
- >That should be "1 SHL I" for the usual bit numbering. Yours misses the
- >least significant bit, and numbers the others from 0 to 14.
- >
- >Duncan Murdoch
-
- Yes, of course, that's what I meant. Must have been thinking 2^I...
-
- /Kjell
- --
- -----------------------------------------------------------------------------
- ! Kjell Rilbe ! Love is not about getting everything on the list, !
- ! kjell@elixir.e.kth.se ! it's about accepting the things that aren't on !
- ! ! the list! - Stewart Markowitz, LA Law !
-