Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!helios!inetg1!inetg1!dprpjf From: dprpjf@inetg1.Arco.Com (Paul Fowler) Newsgroups: comp.lang.fortran Subject: Re: Read dimension Message-ID: <1991Feb26.200837.13448@Arco.COM> Date: 26 Feb 91 20:08:37 GMT References: <61477@eerie.acsu.Buffalo.EDU> <1012@uncw.UUCP> Sender: news@Arco.COM Reply-To: dprpjf@inetg1.Arco.Com (Paul Fowler) Distribution: usa Organization: Arco Oil & Gas Company Lines: 29 In article , u714092@mustang.larc.nasa.gov (prichard devon ) writes: > In article <1012@uncw.UUCP> session@uncw.UUCP (Zack C. Sessions) writes: > > > xiaofei@acsu.buffalo.edu (Xiaofei Wang) writes: > [He wants to be able to dynamically allocate arrays.] > > I am most familiar with VAX FORTRAN, but I think this applies to > one of the computer gurus suggested to me to write the brunt of the > code in Fortran, but the main routine in C. the C function dynamically > allocates the array in the Fortran subroutine argument list, at which > point its straight Fortran processing. > > I haven't tried this yet, but it oughta work. its definitely the simplest > method for dynamic array allocation I've seen. of course, there may be > funny memory conflicts due to linking Fortran and C code... > To substantiate this suggestion with my 40% of a nickel's worth of experience, I have been using just this approach (C main program using malloc() for dynamic allocation and then calling Fortran computational subroutines) for many years in various flavors of UNIX environments and it has worked just fine for me. -- Paul Fowler ARCO Oil and Gas Co. dprpjf@arco.com Plano, TX