Thorsten Ohl writes:
> In section 5.1, it says:
>
> Constraint: If the TARGET attribute is specified, the POINTER,
> EXTERNAL, INTRINSIC, or PARAMETER attribute shall not be
> specified.
>
> What was the rationale for disallowing the combination of PARAMETER
> and TARGET? I wanted to use it for switching between some large
> precomputed tables, but the compiler wouldn't let me and has the
> standard to back it up ...
Remember that in principle parameters don't even *EXIST* at run-time.
For a large precomputed table, in practice it probably will. But if
you have a scalar parameter value, odds are quite substantial that
it may not even have a run-time address to point to. Or it might have
multiple run-time addresses. The standard doesn't distinguish between
these cases.
You are thinking about a parameter as just a variable whose value
can't be changed. But that's simply not what it is. A parameter is
fundamentally a compile-time construct, which may or may not happen to
have a particular run-time manifestation. Parameter targets just
don't make sense when you realize that parameters are compile-time
things.
Now I've more than once wanted to use PARAMETER and POINTER. I even
tried to get that one allowed in f2k, but the propsal didn't pass.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|