Re: add a0 format to language to print trimmed character variables



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.


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



--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows it can't be done.

-- Henry Ford
.