Path: utzoo!attcan!uunet!cs.utexas.edu!asuvax!stjhmc!p12.f56.n114.z1.fidonet.org!Chris.Gehlker From: Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) Newsgroups: comp.sys.mac.programmer Subject: RE: @ Operator & Keydown events in Think Pascal? Message-ID: <29660.27364102@stjhmc.fidonet.org> Date: 6 Nov 90 04:35:48 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:114/56.12 - AZ MAC UG, Phoenix AZ Lines: 29 > The crucial function has the form: > > function TestKey (i: longint): boolean; > var > myKeys: keyMap; > begin > GetKeys(myKeys); > TestKey := BitTst(@myKeys[1], i) > end; > > When this is run, THINK Pascal tells me that: > > @ can't be applied to a component of a packed type. > > Fair enough, I can accept this (after looking at the manual and IM). > > But the code obviously used to work. What's changed, and what can I change > get it to work again? Or am I missing something obvious? I don't know what's changed. Mchanges in the way that THINK Pascal stores packed structures since version 2. Anyhoo, since you are just testing the second most significant bit of myKeys, why not just cast mykeys to an array of 4 longs ans then test it? -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org