home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4813 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.3 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!caen!destroyer!news.iastate.edu!pv7440.vincent.iastate.edu!btd
  2. From: btd@iastate.edu (Benjamin T Dehner)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Dynamic Memory Allocation in FORTRAN, Question
  5. Message-ID: <btd.724882064@pv7440.vincent.iastate.edu>
  6. Date: 20 Dec 92 20:07:44 GMT
  7. References: <Dec.20.02.22.20.1992.7312@spade.rutgers.edu>
  8. Sender: news@news.iastate.edu (USENET News System)
  9. Organization: Iowa State University, Ames IA
  10. Lines: 23
  11.  
  12. In <Dec.20.02.22.20.1992.7312@spade.rutgers.edu> xiong@spade.rutgers.edu (Xiong) writes:
  13.  
  14. >Hi, I am wondering if it is possible to allocate memory dynomically in
  15. >FORTRAN as in C? I am loooking for something equivalent to:
  16.  
  17. >    int * a;
  18. >    a = (int *) malloc (numx * sizeof (int));
  19.  
  20. >in C.
  21.  
  22.     As far as I know, in standard fortran, the answer is no.  On Ultrix
  23. systems there is are three system calls:  malloc, free, and falloc, (obviously
  24. stolen and added into C :) which are capable of dynamic memory allocation.
  25.     If you are on an Ultrix system, see the man pages.  If you aren't,
  26. I have no idea where these routines come from (decfort?) or if they are
  27. available.
  28.  
  29. Ben
  30.  
  31. -----------------------------------------------------------------------------
  32. Benjamin T. Dehner    Dept. of Physics and Astronomy 
  33. btd@iastate.edu       Iowa State University 
  34.                       Ames, IA 50011
  35.