| Re: add a0 format to language to print trimmed character variables |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: Gary ScottGary Scott Date: Apr 29, 2007 19:33
Gary Scott wrote:
> glen herrmannsfeldt wrote:
>
>> Gary Scott wrote:
>> (snip)
>>
>>> In order to be analogous to I0 though wouldn't it need to trim both
>>> leading and trailing spaces? I don't think that would be the usual
>>> desire though, but maybe you could specify '0a0' to trim leading and
>>> trailing spaces.
>>
>>
>>
>> That is one that I don't think you can do. The repeat specifier
>> comes before the data edit descriptor. If you allowed 0 indicating
>> to trim leading blanks, how would you apply a repeat specifier to it?
>
>
> Perhaps then a special symbol: '\a\'
>
> I didn't really like any that I tried, but this one I like because it
> conflicts with that annoying c escape character that has crept into a
> lot of compilers.
I guess it (\) may not conflict in this context though.
>
>>
>> Suffixes can be applied to descriptors, the most common being the
>> indication of the number of places after the decimal point in
>> descriptors for floating point values. It would look a little
>> strange, but it would seem possible to use that one.
>>
>> Otherwise, as a way to get around an implied DO it still
>> seems a little excessive.
>>
>> -- glen
>>
>
>
|