Re: BSTR and Allocatable arrays



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.
.



Relevant Pages

  • Re: Buffer overflows and asctime()
    ... struct tm members to be within their valid ranges is up to an user of ... There is no valid range for the year as specified in the standard. ... I wouldn't call it a defect, because the existence of a limit beyond which asctime() cannot be safely used is inferable from the description of asctime. ... I would consider it a substantial improvement for the standard to explicitly specify the limit. ...
    (comp.std.c)
  • Re: [fitsbits] Comments on image distortion conventions
    ... The document should specify default values for any coefficients that are absent from the header, but might be expected based upon the value of A_ORDER or B_ORDER. ... Presumably either the values would be taken to be zero or the convention should require that all keywords be present. ... The convention would appear to mis-use the CTYPEi reserved keyword in a way that at least technically violates the FITS standard. ... of including distortion in the pixel world coordinate transformation directly. ...
    (sci.astro.fits)
  • Re: Boolean Buyers Beware ... AIX compiler bug --- PMR 26241,756
    ... But the compiler does have other options for updating byte fields, ... I didn't bring the C++ standard into the discussion, ... C++ doesn't specify anything here, and still one needs multithreading. ...
    (comp.programming.threads)
  • Re: Boolean Buyers Beware ... AIX compiler bug --- PMR 26241,756
    ... IBM identified a source work-around, and claimed the problem was our ... I don't think the C++ standard has a word to say about threads. ... C++ doesn't specify anything here, and still one needs multithreading. ...
    (comp.programming.threads)
  • Meaning of implementation def. behaviour (was: Re: C99 IDE for windows)
    ... International Standard provides two or more possibilities and imposes ... provides all possible courses of action and the implementation is ... how can the Standard specify the output ...
    (comp.lang.c)