Re: Getting information about Fortran95 structures



<McKinldj@xxxxxxxxxxxxxxxx> wrote:

Does anyone know any techniques for decomposing the information about
a Fortran 95 structure? That is, deriving information about the fields
in the structure, their data types, dimensions, etc.?

This question needs more context. But answering what I reasonably can..

The "normal" way is so obvious that I'm guessing it couldn't be what you
are asking about. But just in case I'm wrong... That would be to look at
the type declaration in the source code. For details, I refer to any
Fortran text; it isn't worth the work to detail here (particularly given
the odds that you might not even read it - see below).

If you are trying to deduce such information without having the source
code, the answer is basically no - you can't do that. I can imagine
multiple contexts where such a question might come up, but the answers
range from a flat "no" to "maybe, but that would be completely compiler
dependent." The "maybe" answers would mostly have to do with using
debuggers rather than anything in Fortran code.

Please respond directly to
[email address]

No. I provide help on usenet for free, partly because it can help
multiple people, both those reading now and those future people
searching the archives. If I did private consulting, it would be for a
fee (and I haven't even bothered to figure out what I'd charge, but it
would be typical of professional consulting rates, which aren't cheap).

No, copying an answer both here and to an email is not adequate either.
That's particularly so when as is evident here, a useful answer will
require a bit of iteration to get more information.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: Why float is called as float, not real?
    ... and technical usage do not always coincide. ... of Fortran, and even those that might reasonably be contemplated, are capable ... Those rely on systems and data types other than the intrinsic data ...
    (comp.lang.fortran)
  • Re: A petition to J3 apropos FORTRANs future
    ... James Giles wrote: ... Problem is we define our own data types, which bits are the exponent, ... >> system programming in Fortran. ... Gary Scott ...
    (comp.lang.fortran)
  • Re: Fibonacci series...please help!!!
    ... what kind of data types would i use to create those 'buckets'. ... CHARACTER and COMPLEX. ... For example, Fortran has COMPLEX. ... You can do calculations on REALs ...
    (comp.lang.fortran)
  • Re: Reading in a binary file that contains floats and integers
    ... where the data types are I = integers, ... I actually only need the floats, so if there is a way to use ... Alternatively I can read each line with fgetl, get a string containing ... inconsistencies to tell for absolute sure but I'll assume since you talk of a Fortran FORMAT and fgetl and regexp you mean you have a text file. ...
    (comp.soft-sys.matlab)
  • Re: Read a .BMP into Fortran?
    ... short" and "unsigned int" data types. ... With CVF/IVF a derived type can be made interoperable with a c struct. ... Fortran Library: http://www.fortranlib.com ...
    (comp.lang.fortran)