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: Adding UNION/MAP -- Feedback and tips pls!


"N.M. Maclaren" <nmm1 at cam dot ac dot uk> wrote:
Aside:  There IS actually a very simple way to port DEC UNION code;
simply change them to structures (i.e. derived types).  That wastes
memory but, compared to the machines on which they were used, modern
ones have near-infinite memory.  I can't think of a circumstance under
which working DEC UNION code would fail with that trick.

I can. Many years ago, I worked on a project where UNION/MAP would have been very useful. It was needed because the memory was mapped to hardware which needed data written to certain fixed locations differently depending on context. So I can sympathize with adding the feature (but only under option - not by default.)


I worked around it, but it was somewhat ugly. Today I would try to use type extension and/or class(*) to overlay the memory.

Walter


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