Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!mintaka!nuhub!nic!chaos.cs.brandeis.edu!chaos!phils From: phils@chaos.cs.brandeis.edu (Phil Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: Accessing globals w/ Pascal (a novice wonders) Message-ID: Date: 31 Dec 90 21:15:33 GMT References: <27660.277e4ce1@kuhub.cc.ukans.edu> Sender: phils@chaos.cs.brandeis.edu (Phil Shapiro) Organization: Symantec Corp. Lines: 27 In-Reply-To: mlab2@kuhub.cc.ukans.edu's message of 31 Dec 90 02:24:01 GMT In article <27660.277e4ce1@kuhub.cc.ukans.edu> mlab2@kuhub.cc.ukans.edu writes: How do you access 'globals' from Pascal? Example: Changing the volume of the Mac. Example: Setting the height of the menu bar to 0. Kind of clumsy compared with C: program foo; const MBarHeight = $BAA; { contains integer height of menu bar } type IntPtr = ^Integer; { need this to coerce our constant into a pointer } begin writeln('The current menu bar height is ',IntPtr(MBarHeight)^); IntPtr(MBarHeight)^ := 40; { change it to 40 pixels } end. Note that really removing the menu bar involves changing the GrayRgn. Check out the UMPG, there's an example in there. -phil -- Phil Shapiro Technical Support Analyst Language Products Group Symantec Corporation Internet: phils@chaos.cs.brandeis.edu -- Phil Shapiro Technical Support Analyst Language Products Group Symantec Corporation