Newsgroups: comp.lang.fortran
From: nos...@see.signature (Richard Maine)
Date: Sun, 8 Apr 2007 21:12:04 -0700
Local: Mon, Apr 9 2007 12:12 am
Subject: Re: Transfer and variables that don't use all their storage space.
James Giles <jamesgi...@worldnet.att.net> wrote: Yes, that's what I would expect. *HOWEVER*, if you transfer the bits of > Richard Maine wrote: > > Brooks Moses <bmoses-nos...@cits1.stanford.edu> wrote: > ... > >> The Fortran 2003 standard states that TRANSFER(TRANSFER(E,D),E) > >> should result in E, if D and E are scalar variables and the physical > >> representation of D is as long as or longer than that of E. (Section > >> 13.7.121, lines 30-32.) > > That's one part I'm sure is inconsistent. That can't realistically be > The internal representation of ALLOCATABLE components such a descriptor that is allocated, you are likely to end up with two different allocated allocatables trying to use the same storage. That is certainly not envisioned and is likely to cause havoc. A straightforward reading of the words that Brooks cited above seems to suggest that it ought to work, since the resulting variable is claimed to have the same value as the original. That's the kind of situation I'm envisioning, and I think the cited words of the standard completely fall apart for cases like that. Yes, I can imagine what I'd expect to happen in practice, based on -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||