| Re: Multi-Dimensional Arrays. Is it possible more than seven dimensions? |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: Eugene A. PallatEugene A. Pallat Date: Jul 20, 2008 17:27
> 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.
|