home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22098 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.3 KB

  1. Path: sparky!uunet!usc!davidp
  2. From: davidp@stealth.usc.edu (David Peterson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: "GLOBAL System Variables", Help!!!
  5. Date: 24 Jan 1993 19:07:55 -0800
  6. Organization: University of Southern California, Los Angeles, CA
  7. Lines: 22
  8. Distribution: world
  9. Message-ID: <1jvlibINN30b@stealth.usc.edu>
  10. References: <1993Jan21.200510.7950@fcom.cc.utah.edu> <C1CAAv.9Hu@news.udel.edu>
  11. Reply-To: davidp@usc.edu
  12. NNTP-Posting-Host: stealth.usc.edu
  13.  
  14.  
  15. In article <C1CAAv.9Hu@news.udel.edu>, lecates@bach.udel.edu (Roy LeCates) writes:
  16. |> In article <1993Jan21.200510.7950@fcom.cc.utah.edu> Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu> writes:
  17. |> >Does anyone know how to write/read Global variables in THINK Pascal ?
  18. |> >I have an address of CurActivate ($0A64) and size (4).
  19. |> >Think Reference says that it's a "Global Variable", but
  20. |> >when I tried to use it in Pascal it says "unknown indef.".
  21. |> >" MyWindow := CurActivate; "
  22. |> 
  23.  
  24. Well, it C you do something like this to set a global:
  25.  
  26.     *((GlobalType*) GlobalName) = newValueOfTypeGlobalType;
  27.  
  28. I'm not positive about Pascal, but I think it would look something like this:
  29.  
  30.     (GlobalType^(GlobalName))^ := newValueOfTypeGlobalType;
  31.  
  32. Works for types four or less bytes in size. (In C at least, Pascal might
  33. copy the whole thing over.) Just turn it around to read the global.
  34.  
  35. -dave.
  36.