Re: A few syntax questions
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Fri, 24 Feb 2006 14:46:01 -0800
Joe Krahn <krahn@xxxxxxxxxxxxx> wrote:
So, it seems that they are included due to the presence of an implicit
RETURN, if reached, even though they are themselves not really an action
statement. Still, I think putting them in the 'action-stmt' syntax rule
is an unneeded complication. Maybe a note about implicit returns would
be better.
I'm afraid I am not interested in discussing how to optimize the bnf of
the standard. If I were to redo the bnf from scratch, I'd do many things
differently. Some of them evenhave technical impact instead of just
editorial. There are a few annoying "features" that have, in my opinion,
no real technical justification, but it would have made the bnf messier
to make them "right". (High on that list is the mess whereby -32768 is
always parsed as a unary minus operating on a positive 32768, with the
result that it overflows in 16 bits. I'm sure that can be solved; heck,
some compilers do so; it is just messier to write bnf for doing it
"right".)
Because it is for backwards compatibility, it seems that it
would be realitvely easy to restrict newer constructs to being used only
in case sensitive (free-form) source code.
I tried suggesting that once. Actually more than once. There are a few
cases where f90 syntax is uglier than it would "need" to be if it were
restricted to free source form. And there are some inherited f77 syntax
items like that also, such as the parens in the parameter statement.
But to say that I got no interest would be an overstatement. What I got
was much more along the lines of "even if it comes out of the standard,
vendors will keep supporting fixed source form and will object to new
features that won't work in it...because their users will object."
That's the longer, polite version of the responses I got. :-)
For an allocatable item, it seems only the LEN integer is this type of
constant.
No. It isn't a constant in that sense at all. You can change it by
reallocating. Ah, if you are going to say that reallocating doesn't
"count", then evidently you don't literally mean "not modifiable". You
mean something more like "not modifiable in ways that count" (probably
not quite using that terminology :-)) and then define the exact details.
Also, it doesn't mean the other part of your definition because a LEN
type parameter of an allocatable isn't a data object with an actual
defined place that you can point to. Odds are good that the
implementation must have stashed it in memory somewhere, but you
certainly can't point to it.
--
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: A few syntax questions
- From: Joe Krahn
- Re: A few syntax questions
- From: James Giles
- Re: A few syntax questions
- References:
- A few syntax questions
- From: Joe Krahn
- Re: A few syntax questions
- From: Richard E Maine
- Re: A few syntax questions
- From: Joe Krahn
- A few syntax questions
- Prev by Date: Re: Variable length/precision formats?
- Next by Date: Re: Non-Standard Conventions
- Previous by thread: Re: A few syntax questions
- Next by thread: Re: A few syntax questions
- Index(es):
Relevant Pages
|