Re: Multi-Dimensional Arrays. Is it possible more than seven dimensions?
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Multi-Dimensional Arrays. Is it possible more than seven dimensions?         

Group: comp.lang.fortran · Group Profile
Author: Eugene A. Pallat
Date: Jul 20, 2008 17:27

hotmail.com> wrote in message
news:3296cd16-ebff-4585-93ab-6d3a6f94ed1f@c65g2000hsa.googlegroups.com...
> Hello. I have a problem on trying to define an array with eight
> dimensions. I tried the following:
> integer :: N=10
> complex,dimension(-N:N,-N:N,0:1,0:1,-N:N,-N:N,0:1,0:1) :: P
>
> , but i get an error when compiling that the array cannot have more
> than seven dimensions.
> I'm working under gfortran version 4.3.0 .
> Thank you for any recommendation on what to do, or suggestion about an
> alternate solution.

Use equivalence statements to get the added dimensions. It's a little more
work, but it's a workaround.

I ran into a problem where I needed a 4 dimensional matrix in COBOL. The
Univac reps said no one could understand more than 3 dimensions. I told
them, "I could understand 10. Too bad about you guys."

I just redefined the matrices which was the COBOL version of equivalence and
had no problem with a 4 dimensional matrix.

(I always refered to arrays and matrices, which bugged them.)

Just make sure you have enough memory available and you can have as many
dimensions you need.
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Re: Helper to create multi-dimensional arrayscomp.lang.ruby ·