Re: busting sp datatypes
- From: LR <lruss@xxxxxxxxxxxxx>
- Date: Fri, 29 Aug 2008 11:20:09 -0400
Richard Maine wrote:
LR <lruss@xxxxxxxxxxxxx> wrote:
IIRC equivalence is being depreciated,
Not formally in the standard. In fact the concept of deprecation was
dropped from the f90 draft before it ever got formally into the
standard. Plenty of individuals (myself included) personally consider
equivalence to be deprecated, but that needs to be qualified as a
position of the individuals in question instead of just is "is being
deprecated".
but would it be of help here to equivalence
character*7 x(10)
to something like
integer*1 x(7)(10)
I haven't had to worry about the order of those kinds of dimensions in
quite some time, so sorry if I got those wrong. Also, I'm not sure that
integer*1 is legal or even possible.
Well now we don't need to get into deprecation to see "issues" with
that. Equivalencing character with non-character data has never been
standard in the first place (which is quite a bit more severe then being
deprecated). Nor has the integer*1 syntax. Even among compilers that
accepted the nonstandard integer* syntax, some did not allow *1.
Ok, thanks for that. So is there a nice way to sort character*7 calling
C's qsort from Fortran?
On another, somewhat related topic, I was taking a look through what I
think is a recent draft, March 2008, of the 2008 standard. The examples
of C structs in that standard don't seem quite right to me. They seem
to be missing the squiggly brackets '{' and '}'. I could be wrong, but
I don't think the examples are correct C.
Perhaps this has already been corrected? Although I did a quick search
there I'm not familiar enough with the j3-fortran.org site to figure
that out. Or maybe the brackets are in there and my pdf viewer isn't
working correctly? Perhaps I am wrong about my expectation of what C
structs should look like?
Do you happen to know?
I found this when I went past the section labeled "Decremental features"
and found myself reading about bind and other things in Appendix C of
this particular draft. I saw this C struct example:
struct pass int lenc, lenf; float *c, *f;;
which I think should be
struct pass { int lenc, lenf; float *c, *f; };
A search reveals at least one more example of this kind.
LR
.
- References:
- Re: busting sp datatypes
- From: glen herrmannsfeldt
- Re: busting sp datatypes
- From: wim
- Re: busting sp datatypes
- From: Ron Ford
- Re: busting sp datatypes
- From: Ron Shepard
- Re: busting sp datatypes
- From: Richard Maine
- Re: busting sp datatypes
- From: glen herrmannsfeldt
- Re: busting sp datatypes
- From: LR
- Re: busting sp datatypes
- From: Richard Maine
- Re: busting sp datatypes
- Prev by Date: Re: Conversion from int to char
- Next by Date: Re: busting sp datatypes
- Previous by thread: Re: busting sp datatypes
- Next by thread: Re: busting sp datatypes
- Index(es):
Relevant Pages
|