"Van Snyder" <[log in to unmask]> wrote:
...
> > Having just said that (based on vaguely remembered discussions
> > in the newsgroup) I can't actually find the feature in the proposed
> > document. Did I misremember, or is there somewhere in the
> > document I need to look?
>
> Type parameters are discussed in 4.2, starting on page 32. Character type
> is defined to have a nonkind type parameter LEN at [32:13-14]. At [32:16ff]
> we see the syntax for declaring a "deferred type parameter" and restrictions
> on it. In the discussion of the ALLOCATE statement in 6.3.1, starting on
> page 108, we see that one can put a type-spec, in which one has to specify
> type parameter values if the type has any parameters. The constraint at
> [32:20-21] prevents these from being colons, so the only possibilities are
> integers and asterisk. An integer expression has an obvious interpretation.
> Asterisk means "get the value from the corresponding parameter of the actual
> argument corresponding to the dummy argument."
>
> Does that explain it?
Well, no. Unless all this means that character strings cannot have
dynamic length. The description of the ALLOCATE statement you
refer to contains the constraint [109:14-15] that the type specs in the
ALLOCATE statement must agree with the type specs declared for
each object it's applied to. So, if the LEN specified in the declaration
of the object name is N, the LEN specified in the ALLOCATE statement
must also be the same N. Or am I still misreading it? Another instance
where an example would seem appropriate.
--
J. Giles
|