Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Low memory globals from C (Was RE: Finding Screensize under MF) Message-ID: <9672@hoptoad.uucp> Date: 14 Jan 90 11:11:43 GMT References: <10139@saturn.ucsc.edu> <9429@hoptoad.uucp> <1102@urbana.mcd.mot.com> <10276@saturn.ucsc.edu> <9623@hoptoad.uucp> <4615@helios.ee.lbl.gov> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 22 In article <9623@hoptoad.uucp> tim@hoptoad.uucp (Tim Maroney) writes: >#To access low-memory globals from C, if you must, you use the macro >#preprocessor. For instance, you would say ># >##define CurrentA5 (*(long *)0x904) In article <4615@helios.ee.lbl.gov> beard@ux1.lbl.gov (Patrick C Beard) writes: >A cleaner way to do low memory globals from THINK C is the ':' notation. > >extern Ptr CurrentA5 : 0x904; > >This method gives you do type checking if you want. So do the macros; the expression has a type. I don't think it's "clean" to add new language features when existing ones will do just as well. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Every year, thousands of new Randoids join the ranks. Most tend to be either too-rich self-made tycoons or picked-on computer nerds (the romantic, heroic individualism of Rand's novels flatters the former and fuels the latter's revenge fantasies)." -- Bob Mack, SPY, July 1989