Re: ALLOCATABLE arrays
From: Herman D. Knoble (SkipKnobleLESS_at_SPAMpsu.edu)
Date: 01/06/04
- Next message: Gus Gassmann: "Re: ALLOCATABLE arrays"
- Previous message: Matthew C Roberts: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- In reply to: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Next in thread: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Reply: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 06 Jan 2004 11:04:14 -0500
Lawson: Apologies if I misunderstand you post here. The bound(s) of an automatic array
need not be defined in a module. E.g., see first case of working examples in file:
http://ftp.cac.psu.edu/pub/ger/fortran/hdk/AutomaticArray.f90
Skip Knoble, Penn State
On Tue, 6 Jan 2004 14:48:18 +0000, Lawson Wakefield <lawson@see.my.sig> wrote:
-|In article <btbnj7$4qu$06$1@news.t-online.com>, Michael Metcalf
-|<metcalfm@acm.org> writes
-|>
-|>"Gus Gassmann" <hgassman@mgmt.dal.ca> wrote in message
-|>news:3FF953CD.BB2A1853@mgmt.dal.ca...
-|>>
-|>> Do I read this right?
-|>>
-|>> Suppose I declare
-|>>
-|>> subroutine test
-|>> integer :: i
-|>> dimension i(k)
-|>>
-|>> where k is set in a module somewhere. Is it then the case that
-|>> a) i gets allocated automatically on entry to test and deallocated
-|>> on exit
-|>> b) this operation takes (essentially) zero time?
-|>>
-|>> Is that really all there is to it? I'm afraid to look a gift horse
-|>> in the mouth, but this sounds too good to be true!
-|>>
-|>It is. The shape of an automatic array must depend on an argument to the
-|>procedure that it is local to. It is created on a stack at each invocation.
-|>The main use is for temporary storage ("Fortran 90/95 Explained", Section
-|>6.4).
-|
-|Are you absolutely sure about that Mike? Specifically, the requirement
-|that the shape of an automatic array must rely on an argument to the
-|procedure would not appear to apply. My understanding is that the
-|bound(s) of an automatic array must be a specification expression. As
-|such this also allows for variables which are defined in a module, as
-|Gus suggests. Certainly, the latter usage works with a remarkably wide
-|range of Fortran 9x compilers if is not in fact allowed.
-|
-|Lawson Wakefield
-|Interactive Software Services Ltd.
-|The Fortran GUI specialists
-|web: http://www.winteracter.com/iss
-|email: see our web page
Herman D. (Skip) Knoble, Research Associate
(a computing professional for 38 years)
Email: SkipKnobleLESS@SPAMpsu.edu
Web: http://www.personal.psu.edu/hdk
Penn State Information Technology Services
Academic Services and Emerging Technologies
Graduate Education and Research Services
Penn State University
214C Computer Building
University Park, PA 16802-21013
Phone:+1 814 865-0818 Fax:+1 814 863-7049
- Next message: Gus Gassmann: "Re: ALLOCATABLE arrays"
- Previous message: Matthew C Roberts: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- In reply to: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Next in thread: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Reply: Lawson Wakefield: "Re: ALLOCATABLE arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|