Re: iso_varying_string in f2003?
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Mon, 01 Aug 2005 21:38:51 GMT
Richard E Maine wrote:
> In article <vjose1tc3ifaj21v2763nbgd9v23l3gbe3@xxxxxxx>,
> Steve Lionel <Steve.Lionel@xxxxxxxxxxxxxxxxx> wrote:
>
> You're proposing that the compiler reallocate (if
>> needed) variable line to the length of the input? I can't claim
>> to have studied this in depth, but a quick glance at the F2003
>> standard suggests that such behavior would violate this part of
>> the standard, "If a field width w is not specified with the A edit
>> descriptor, the number of characters in the field is the length of
>> the corresponding list item". Your proposal would change this
>> behavior ...
>
> Only if there is such a length (i.e. if the string is allocated).
> If the string isn't allocated, then the code is illegal, and thus
> one could consider things that would extend rather than violate the
> standard. Now crafting such extensions sensibly.... well that might
> be nontrivial, as mentioned in my other post.
Well what about this:
Add a new Format edit descriptorAL whose field width is all the
remaining characters of the present input record. If the corresponding
I/O list item is a conventional fixed length character variable, the
result is the same as if Aw had been specified for that very field
width w. If the corresponding list item is a deferred length string,
then the result is to allocate the string to the appropriate length
(deallocating, if it's already allocated) and place the data there.
I think that may cover all the bases.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- References:
- iso_varying_string in f2003?
- From: Rich Townsend
- Re: iso_varying_string in f2003?
- From: Richard Maine
- Re: iso_varying_string in f2003?
- From: Rich Townsend
- Re: iso_varying_string in f2003?
- From: Steve Lionel
- Re: iso_varying_string in f2003?
- From: David Frank
- Re: iso_varying_string in f2003?
- From: Steve Lionel
- Re: iso_varying_string in f2003?
- From: Richard E Maine
- iso_varying_string in f2003?
- Prev by Date: Re: number of columns
- Next by Date: Re: writing characters using Z edit descriptors
- Previous by thread: Re: iso_varying_string in f2003?
- Next by thread: Why I can't build the release version with cxml
- Index(es):
Relevant Pages
|