home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!ncrpda.curtin.edu.au!rocky.curtin.edu.au!user
- From: peter@cujo.curtin.edu.au (Peter N Lewis)
- Subject: Re: "GLOBAL System Variables", Help!!!
- Message-ID: <peter-260193111702@rocky.curtin.edu.au>
- Followup-To: comp.sys.mac.programmer
- Lines: 29
- Sender: news@ncrpda.curtin.edu.au
- Nntp-Posting-Host: ncrpda.curtin.edu.au
- Organization: NCRPDA, Curtin University
- References: <1993Jan21.200510.7950@fcom.cc.utah.edu> <C1CAAv.9Hu@news.udel.edu>
- Date: Tue, 26 Jan 1993 03:17:57 GMT
-
- In article <1993Jan21.200510.7950@fcom.cc.utah.edu> Dmitry Boldyrev
- <dmitry@chemistry.chem.utah.edu> writes:
- >Does anyone know how to write/read Global variables in THINK Pascal ?
- >I have an address of CurActivate ($0A64) and size (4).
- >Think Reference says that it's a "Global Variable", but
- >when I tried to use it in Pascal it says "unknown indef.".
- >" MyWindow := CurActivate; "
-
- I do it thusly:
-
- const
- ToolScratch = $9CE;
-
- var
- ToolScratchP: ^ptr;
-
- begin
- ToolScratchP := POINTER(ToolScratch);
- { then use or set ToolScratchP^ }
- end;
-
- Unfortunately, THINK Pascal doesn't support globals, so this is the only
- way of doing it, I think. I'm not sure if there isn't an interface you
- could include that has all the global addresses defined, I just paste them
- in with ObiWan :-)
- Peter.
-
- _______________________________________________________________________
- Peter N Lewis <peter@cujo.curtin.edu.au> Ph: +61 9 368 2055
-