Ross,
At 07:37 21-04-99 -0700, you wrote:
>Our EPC90 compiler does not allow an equivalence of a derived type
>containing
>both numeric and character storage to a common block. For example:
>
> INTEGER I
> CHARACTER*8 C
> COMMON / COMBLK / I, C
>
> type :: RECBLK
> sequence
> INTEGER I
> CHARACTER*8 C
> END type recblk
> type (recblk) :: REC
>
> EQUIVALENCE ( I, REC)
>
>The above results in the following error message:
>"The variable REC cannnot appear in a numeric equivalence set."
>
>Question: Is there any way around this? That is, how can I equivalence
>a derived type containing both numeric and character elements?
Why would you want to do this ?
The way to do this (Indeed eqv is forbidden here)
I = REC%I
or
I = transfer (rec, I) ! this works for any type !
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|