home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!uxa.ecn.bgu.edu!news.ils.nwu.edu!engber
- From: engber@ils.nwu.edu (Mike Engber)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Hilite a Rect
- Keywords: color, hilite, novice
- Message-ID: <1992Nov17.153747.28612@ils.nwu.edu>
- Date: 17 Nov 92 15:37:47 GMT
- Article-I.D.: ils.1992Nov17.153747.28612
- References: <1e9v71INNgqn@agate.berkeley.edu> <1eavmkINNojo@falcon.natinst.com>
- Sender: usenet@ils.nwu.edu (Mr. usenet)
- Organization: The Institute for the Learning Sciences
- Lines: 18
- Nntp-Posting-Host: aristotle.ils.nwu.edu
-
- >I never use the BitClr function (for byte to long sized variables) because
- >you get the extra trap dispatch overhead. The way I code my highlights is:
- >
- > *(char*)HiliteMode &= ~(0x01<<hiliteBit);
- >
- >However, I don't know why your code using BitClr should cause a buss error.
-
- My guess is the the original poster is using THINK C which defines globals
- as external vars - (not their addresses). From LoMem.h:
- char HiliteMode : 0x938;
-
- In which case your suggestion will suffer the same problem. He needs to use:
- BitClr(&HiliteMode,pHiliteBit);
-
- I made this same mistake myself recently. It's so easy (and foolish) to copy
- code right from IM w/o thinking.
-
- -ME
-