home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5145 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!caen!nic.umass.edu!umassd.edu!hshubs
  3. From: hshubs@cis.umassd.edu (Howard S Shubs)
  4. Subject: Re: Block Data is evil
  5. Message-ID: <C1AMpC.BAt@umassd.edu>
  6. Sender: usenet@umassd.edu (USENET News System)
  7. Organization: University of Massachusetts Dartmouth
  8. References: <1993Jan20.143408@roper.mc.ti.com> <1993Jan21.074755.14939@arcetri.astro.it> <1993Jan22.183106.15813@newshost.lanl.gov>
  9. Date: Sat, 23 Jan 1993 06:15:10 GMT
  10. Lines: 30
  11.  
  12. In <1993Jan22.183106.15813@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. Giles) writes:
  13.  
  14. >In article <1993Jan21.074755.14939@arcetri.astro.it>, lfini@sisifo (Luca Fini) writes:
  15. >|> W. Donald Rolph (a722756@roper.mc.ti.com) wrote:
  16. >|> : 
  17. >|> : Equivalence is in some cases the only possiblity for run time memory allocation
  18. >|> :
  19. >|> 
  20. >|> Equivalence is *not* a run rime memory allocation, you simply call the
  21. >|> same memory area with different names (and possibly use it as different
  22. >|> data types).
  23.  
  24. >Yes, and that permits you to do run-time management of a statically
  25. >allocated "maximum" space.  You figure out what the maximum memory
  26. >you ever need is and you statically allocate that much:
  27.  
  28. >      PARAMETER (MAXMEM=1000000)
  29. >      COMMON /MEMORY/ MEM(MAXMEM)
  30.  
  31. >This reserves one million integer sized words.  Now, you can write
  32. >a MALLOC routine which returns avalable space from within this array
  33. >in the form of an index (you actually have two mallocs, one for
  34. >integers and reals, the other for complex and doubles - since the
  35. >indices must be scaled differently).  To use:
  36.  
  37. You're not seriously suggesting that this be used in production code,
  38. are you?  If you are, is this intended as job security?
  39. -- 
  40. Howard S Shubs    hshubs@bix.com          For to win 100 victories in 100
  41. The Denim Adept   hshubs@cis.umassd.edu   battles is not the acme of skill.
  42.