Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rank > 1 Assumed Size Arrays

Status
Not open for further replies.

frothytoad

Technical User
Aug 1, 2003
32
US
Hi

I am passing rank 2 and rank 3 arrays to a subroutine, and running into the following problem: The compiler (Lahey Fortran 90) tells me that only the last dimension of an array can be of an assumed size.

Is this really true, or am I just not asking it correctly?

I have tried using statements like:

Real*8 array(*)

and

Real*8 array(*,*,*)

to tell it to use assumed sizes.

Any help would be much appreciated...

-- f
 
An idea to try to use REAL * 8 array(1,1,1) in the subroutine ?
 
The way I found around the problem yesterday was to use something like:

Real*8 array(1:,1:,1:)

Is array(1,1,1) a shorthand for the same thing?

-- f

N.B. Is it just my imagination, or does using unspecified-sized arrays slow processing time by a factor of about a billion???
 
Probably the array specification 1: (no upper boundary) can only be used in subprograms.
 
A billion times slower seems a little doubtful. That would mean that a program that took 1 second to run using fixed array sizes would take 31 years to run if you changed it to use unspecified array sizes (or 31,000 years if you mean a British billion)

CaKiwi

"I love mankind, it's people I can't stand" - Linus Van Pelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top