Re: BSTR and Allocatable arrays
- From: Richard Maine <nospam@xxxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 13:24:44 -0700
In article <UbC_e.27679$nq.26765@lakeread05>,
"apm" <Contributor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Does the Fortran standard specify anything about how the
> allocatable array is implemented in binary? Anyone how it appears in binary?
The Fortran standard doesn't specify how *ANYTHING* is implemented. THat
is fundamental to the standard. It just specifies what kinds of things
have to work. In practice, that often pretty much limits the
implementations, but that is still importantly different from the
standard actually specifying the implementation directly.
As to how allocatables are typically implemented (I'll ignore the "in
binary" part, because I can't fathom what it would mean. Certainly
nothing to do with base 2. I think you just mean how it is implemented
in the executable code, anyway...), an allocatable array pretty much
"has" to look just like any other array in order for everything to work
as specified in Fortran. That isn't a direct requirement of the
standard, but it is the "obvious" implementation and I know of no
exceptions in actual compilers.
Generally, (though not by requirement of the standard) an allocatable
array will be allocated in contiguous memory. There will be a separate
descriptor somewhere and that descriptor will have the address of the
allocatable, along with size information. Lower level details will vary.
.
- References:
- BSTR and Allocatable arrays
- From: apm
- BSTR and Allocatable arrays
- Prev by Date: Re: BSTR and Allocatable arrays
- Next by Date: NEWBIE QUESTION
- Previous by thread: Re: BSTR and Allocatable arrays
- Next by thread: NEWBIE QUESTION
- Index(es):
Relevant Pages
|