This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNION and MAP commands


On Saturday 28 August 2004 09:22, Peter Kämpf wrote:
> Hi,
>
> as a longtime F90 user, I try to get my programs running with gfortran.
> So far, most code compiles well, except for UNION assignments, which
> seem to be not yet implemented. Since they are, strictly speaking, not
> part of the core F90 language, will they ever be implemented?
>
> The semantics are:
> TYPE foo
>    UNION
>       MAP
>          [variable declaration 1]
>       END MAP
>       MAP
>          [variable declaration 2]
>       END MAP
>    END UNION
> END TYPE foo
>
> This will assign the same storage location to declaration 1 and
> declaration 2, somewhat like EQUIVALENCE. UNION is very helpful in
> making code much more readable, yet flexible, by adressing single field
> elements with descriptive names. I would miss it a lot!

Like the rest of gcc, gfortran is a volunteer driven project. Basically this 
means things get done when a someone cares enough to write the 
implementation, or pays someone else to do it for them.

I don't think anyone would object to UNION types, they look like a fairly 
clean and useful extension. However I'm not aware of anyone planning to 
implement them in the near future.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]