This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g77 and allocated arrays
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Lars Segerlund <lars dot segerlund at comsys dot se>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 22:31:20 +0100
- Subject: Re: g77 and allocated arrays
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <3E2BFFB6.7030407@comsys.se>
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)