home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22120 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.7 KB  |  46 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!sol.ctr.columbia.edu!mhall
  3. From: mhall@occs.cs.oberlin.edu (Matthew Hall)
  4. Subject: Re: "GLOBAL System Variables", Help!!!
  5. In-Reply-To: lecates@bach.udel.edu's message of Sun, 24 Jan 1993 03:42:30 GMT
  6. References: <1993Jan21.200510.7950@fcom.cc.utah.edu> <C1CAAv.9Hu@news.udel.edu>
  7. Sender: nobody@ctr.columbia.edu
  8. Organization: Oberlin College Computer Science
  9. Date: Mon, 25 Jan 1993 13:55:13 GMT
  10. Message-ID: <MHALL.93Jan25085513@occs.cs.oberlin.edu>
  11. X-Posted-From: occs.cs.oberlin.edu
  12. NNTP-Posting-Host: sol.ctr.columbia.edu
  13. Lines: 31
  14.  
  15. In article <C1CAAv.9Hu@news.udel.edu> lecates@bach.udel.edu (Roy LeCates) writes:
  16.  
  17.  
  18. >   >Does anyone know how to write/read Global variables in THINK Pascal ?
  19. >   >I have an address of CurActivate ($0A64) and size (4).
  20. >   >Think Reference says that it's a "Global Variable", but
  21. >   >when I tried to use it in Pascal it says "unknown indef.".
  22. >   >" MyWindow := CurActivate; "
  23.  
  24. First, All lo-mem globals are defined in the Interfaces file SysEqu.p
  25. which should be in your ThinkPascal::Interfaces.  Just dump it in your
  26. project and add it to Uses.  It won't add to your code size (it's all
  27. constants), and once it's built it shouldn't have to be rebuilt, so it
  28. wont add compile time.
  29.  
  30. Second, I believe that you can just type
  31. MyWindow:= WindowPtr(ptr(CurActivate)^);
  32.  
  33. You may have to declare a type LongPtr = ^Longint; and substitute that
  34. for the ptr.
  35.  
  36. Hope this helps,
  37. -matt hall
  38.  
  39. --
  40. -------------------------------------------------------------------------------
  41. Matt Hall.    mhall@occs.oberlin.edu  OR  SMH9666@OBERLIN.BITNET
  42.               (216)-775-6613 (That's a Cleveland Area code. Lucky Me)
  43.  
  44.                          F(X)=M*X*(1-X)  
  45.  
  46.