how to use 1D array as a multidimensional array

From: Kamaraju Kusumanchi (kk288_at_cornell.edu)
Date: 06/28/04


Date: Mon, 28 Jun 2004 11:50:58 -0400

I am not sure what the technical term for this is. But i guess it could
be called array aliasing.

I have a 1D array declared by

real, dimension(100) :: A

Now I want to access this array as a "2D equivalent"

like B(i,j) where B is a 10x10 array and
B(i,j) = A(i*10+j)

required functionalities
1) As soon as one element of A changes, B should automatically get the
new value.
2) Should be able to access the array by both A, B.
3) If possible there should not be two instances of A, B.

What is most easy way to achieve the above functionality? Does fortran
90 have some nice subroutines which does this?

If is of any help, I will be using debian unstable, ifc 7.1 or absoft
8.0, Fortran 90/95

thanks in advance
raju



Relevant Pages

  • Re: Who uses clapack?
    ... > functions like SUM and MAXVAL and the ability to use array sections ... > drastically change the meaning of a Fortran code. ... >>Have you ever seen those bills for a Fortran compiler for an ... engineering applications in the C and C++ languages. ...
    (comp.lang.fortran)
  • Re: Who uses clapack?
    ... > functions like SUM and MAXVAL and the ability to use array sections ... > drastically change the meaning of a Fortran code. ... >>Have you ever seen those bills for a Fortran compiler for an ... engineering applications in the C and C++ languages. ...
    (sci.math.num-analysis)
  • Re: Benchmarking APL
    ... with that of FORTRAN. ... APL a 400% gain in programming efficiency could be obtained with only ... Another good-for-APL array problem, vector convolution, gave these ... Tomcatv, one of the SPEC benchmarks, is more typical of large array ...
    (comp.lang.apl)
  • Re: Mixing C++/Fortran using Two-Dimensional Array
    ... not a subset as in Fortran. ... if you really need it you can get the effect by an array of TYPE ... the lowest-level base element pointer, which is all you actually need ... macros in C, although it can be difficult to find macro names that are ...
    (comp.lang.fortran)
  • Re: how to "translate" dynamic array in FORTRAN 90 to Java code?
    ... I am translating a Fortran program to Java code. ... is an array with size unspecified. ... I use Object array in Java to translate FORTRAN array. ...
    (comp.lang.java.programmer)