From: glen herrmannsfeldt on
Richard Maine <nospam(a)see.signature> wrote:
(snip, I wrote)

>> (Just wondering, why no elemental trim function...)

> Come now, it isn't that hard to deduce. Just think about what the result
> of such a function would be. In particular, think about the type and
> type parameters of the result. Let's see, its type would be character,
> and its length would be... umm...

I completely realized that at the time, but

write(*,'(1000(a,1x))') trim(x)

just looked so nice that I had to try it.

Though if one really wanted this feature, it would likely
be added to the A format descriptor, and not as a special
case for the trim function. (Yes, I remember the recent
discussion about special cases.)

Funny, though, in another group when someone was trying to
print out right justified characters with A1 format I was
remembering the DEC systems that used to have the R format
descriptor for right justified characters. That is,
A1 will print out the leftmost character in a variable,
while R1 will print out the rightmost character.

-- glen
First  |  Prev  | 
Pages: 1 2 3 4 5 6 7
Prev: many runs in one directory
Next: pressure and fortran