--On Friday, September 3, 2004 2:09 PM -0600 James Giles
<[log in to unmask]> wrote:
> Richard Maine wrote:
>> Yes. You can't have something like 5* as part of an
>> undelimited character string (that's item 4 in the list
>> of things you can't have). That restriction resolves
>> what would otherwise be a potential ambiguity.
>
> Since the 5* is not part of the undelimited string in this
> example, but is *intended* to be a repeat count, how does
> item 4 apply?
It doesn't. My sentence about that was trying to explain why
the 5* isn't a problem. If that restriction didn't exist,
then there would be an ambiguity. But that restriction
exists, so there isn't. Note my "Yes", which was saying
that yes, it is allowed; the rest of the para was to explain
why it works.
>> That mention was to clear up
>> a more subtle point that came up in an interp.
> For those of us with difficulty navigating the mysteries of the
> j3-fortran website, could you be more specific about the
> potential ambiguity?
It is ugly. My answer would have just been "don't do that",
but vendors tend to need more justification than that when
telling their users that something isn't allowed. I'm not
sure it was an ambiguity as much as a question of whether
something was allowed at all. I really don't feel like taking
the time to track down all the details, but the basic question
involved things like 5*42, where the 42 could validly be interpreted
as either an undelimited character string or as a number. All is
fine if the I/O list has either 5 character items or 5 numeric
items, but suppose it has a mix of character and numeric items
here? Can the 42 be a character for some of the 5 repeats and a
number for the others, or does it have to have the same interpretation
for each of the 5 repeats?
The best answer is, IMO, just don't do that - yukk. Well, I guess
that's basically what the interp answer says, but in somewhat less
blunt terms. In fact the terms are so subtle that you probably wouldn't
have guessed what question they are answering without reading the interp
(or unless doing that kind of thing had actually occurred to you). The
words just say something to the effect that the 42 is interpreted
based on the first of the 5 items (so no, it can't be interpreted
differently for each item).
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|