Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Wed, 27 Sep 2006 09:35:43 -0700
Walter Spector <w6ws_xthisoutx@xxxxxxxxxxxxx> wrote:
IMO, the Standard should have a KIND available, perhaps residing in
ISO_FORTRAN_ENV, which represents an integer capable of holding the
SIZE of the largest array the implementation supports. (Kinda like
size_t in C.) Same for character string length. Then the intrinsics
should be defined to return results in terms of these types/kinds.
There would be no compatibility issues that I can see. Just programs
that used to be broken would suddenly start working...
And programs that used to work would suddenly be broken. Yes, there are
compatibility issues. You can't just change things like that without
invariably hitting them. My off-hand guess is that the number of working
programs that would break would exceed the number of broken programs
that would start working.
Trivial example
call my_sub (something, size(something))
Of course, my_sub expects a default integer for its second argument.
make it an external procedure with an explicit interface to minimize the
odds of the compiler catching the problem. And, of course, the
application in question doesn't use huge arrays, so it is working just
fine now with 32-bit default integers.
This isn't even an arcane made-up example to illustrate the point.
That's a common programming paradigm. *LOTS* of code does it.
I'm afraid I don't know a good and simple solution. I once thought that
having default integers go to 64 bits would do it. But, as I mentioned
in my previous post, that doesn't seem likely to happen - at least not
rapidly. There is no bar to it in terms of the standard - just in terms
of existing user code that makes nonstandard assumptions. But that
existing code is still a real issue to deal with; it cannot be just
ignored. You proposed fix breaks even existing code that is perfectly
standard conforming.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Walter Spector
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Walter Spector
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- References:
- Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Jim Klein
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: David Flower
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Richard E Maine
- Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- From: Walter Spector
- Strange Porting Problem CVF to IVF, requesting help and ideas.
- Prev by Date: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Next by Date: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Previous by thread: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Next by thread: Re: Strange Porting Problem CVF to IVF, requesting help and ideas.
- Index(es):
Relevant Pages
|