tralalaLinda
Programmer
Hi,
I'm all new with Fortran and has been given a code to run. I'm now trying to understand all the code, but I have some problems with the EQUIVALENCE statement...
What I have understood so far is that the variables share a common memory space. But will they have the same value?
I have the code
COMPLEX*16 AA,AB
DIMENSION BA(2),BB(2)
EQUIVALENCE (AA,BA(1)),(AB,BB(1))
The variables AA and AB are then given some values, but the variables BA and BB are never given any values. Will BA and BB get the same value as AA and AB?
In the code are the variables BA(1), BA(2), BB(1) and BB(2) used, but I can't see that they are given any values.
I'm confused and I can't understand it...
I'm all new with Fortran and has been given a code to run. I'm now trying to understand all the code, but I have some problems with the EQUIVALENCE statement...
What I have understood so far is that the variables share a common memory space. But will they have the same value?
I have the code
COMPLEX*16 AA,AB
DIMENSION BA(2),BB(2)
EQUIVALENCE (AA,BA(1)),(AB,BB(1))
The variables AA and AB are then given some values, but the variables BA and BB are never given any values. Will BA and BB get the same value as AA and AB?
In the code are the variables BA(1), BA(2), BB(1) and BB(2) used, but I can't see that they are given any values.
I'm confused and I can't understand it...