Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Inconsistent SysEnvirons declaration in IM? Message-ID: <1989Dec8.160406.13158@cs.swarthmore.edu> Date: 8 Dec 89 16:04:06 GMT References: <4184@sbcs.sunysb.edu> Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 35 vallon@sblw.CS.SunySB.EDU (Justin Vallon) writes: > 1) SysEnvirons' procedure declaration uses SysEnvRecPtr, while the > discussion uses SysEnvPtr. Which one is right? I-M is partially in error. You want to pass a pointer to the data structure. (A regular pointer, not a Ptr.) In Pascal, this is done by apparently passing the entire data structure. See below. > 2) I am using LS Pascal 2.0, and have no success in trying to > compile any of the following: > [Incorrect versions Deleted] > ... All give undefined symbol (or whatever the error is) > err := SysEnvirons(1, x); > ... Gives Type Mismatch if I type in the decl of SysEnvRec/Ptr > Anybody use SysEnvirons from LSP 2.0? Yes, try var theWorld:SysEnvRec; begin if SysEnvirons(1,theWorld)=noErr then begin HasCQD:=theWorld.hasColorQD; etc. etc. end end -- _ _|\____ Nick Jackiw | Visual Geometry Project | Math Department / /_/ O> \ ------------+-------------------------+ Swarthmore College | O> | 215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081 \_Guernica_/ ------------+-------------------------+ USA