This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g77 and allocated arrays


Lars Segerlund wrote:

Is there any way of using dynamically allocated arrays in g77 ? I have been checking out automatic arrays but havent got the grip on them yet, and according to the doc's the 'f90 extensions' for allocating storage is not supported.
Fortran 90's ALLOCATE and DEALLOCATE is not supported by g77. g77 does do automatic arrays.

An automatic array is an array (in a subprogram) that gets its size from a dummy argument of the subprogram, e.g.:

SUBROUTINE SUB(A,N)
DIMENSION A(N), B(N)
...
END

Here A is a normal, dummy argument array, whereas B is an automatic array that is allocated everytime control enters the subroutine SUB.

Hope this helps,

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]