For Programmers: Free Programming Magazines  


Home > Archive > Fortran > December 2005 > Re: yet another QUERRY on EQUIVALENCE Re: EQUIVALENCE(variable inside









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: yet another QUERRY on EQUIVALENCE Re: EQUIVALENCE(variable inside
glen herrmannsfeldt

2005-12-08, 3:58 am

kis wrote:

> As this discussion is evolving, here is yet another simple question
> with our "old friend" equivalence which is NOT related with module
> (this time). I try this one:


> program equiv_test


> real :: a(4),b(2),c,d
> equivalence (a(1:2),b),(a(3),c),(a(4),d)


> end program equiv_test


> And I got this error message when compiling it using CVF6.6.


EQUIVALENCE wants an array element, or an array name which is the same
as the first element. All other elements of the array are automatically
equivalenced by position, possibly along with others in COMMON.

equivalence (a(1),b),(a(3),c),(a(4),d)

or

equivalence (a(2),b(2)),(a(3),c),(a(4),d)

will do it.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com