Newsgroups: comp.lang.fortran
From: "James Giles" <jamesgi...@worldnet.att.net>
Date: Mon, 09 Apr 2007 02:45:38 GMT
Local: Sun, Apr 8 2007 10:45 pm
Subject: Re: Transfer and variables that don't use all their storage space.
Richard Maine wrote: The internal representation of ALLOCATABLE components > 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 of a derived type would almost certainly be very similar to the internal representation of a POINTER component. It would probably consist of an address field, some fields to describe the bounds of the allocated object in each of its dimensions, and some tags specifying status (at least one: whether the object is allocated or not). As such, that internal representation probably takes up the same amount of room whether the components are allocated or not. What TRANSFER would operate on would be the implementation dependent bits of such a hidden descriptor. People have used such tricks to reverse engineer and then manipulate the internal representation of POINTERs before now. -- "I conclude that there are two ways of constructing a software 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.
| ||||||||||||||