Re: add a0 format to language to print trimmed character variables
- From: michael@xxxxxxxxxxxxxxxx
- Date: 27 Apr 2007 23:26:14 -0700
On Apr 27, 5:25 pm, Beliavsky <beliav...@xxxxxxx> wrote:
I wish there were an "a0" format for character variables, analogous to
i0 for integers, which would not print trailing spaces in character
variables. For example,
character (len=5) :: words(4) = (/"one ","two ","three","four "/)
write (*,"(100(1x,a0))") words
would print
one two three four
The TRIM function is not elemental, so one cannot write
write (*,"(100(1x,a))") trim(words)
Currently I write
write (*,"(100(1x,a))") (trim(words(i)),i=1,size(words))
which is slightly awkward IMO.
I am with you. Did you send your suggestion to Andy? Perhaps he can
implement it in g95
Michael
.
- Follow-Ups:
- Re: add a0 format to language to print trimmed character variables
- From: Richard Maine
- Re: add a0 format to language to print trimmed character variables
- References:
- add a0 format to language to print trimmed character variables
- From: Beliavsky
- add a0 format to language to print trimmed character variables
- Prev by Date: Re: repeated namelist behavior
- Next by Date: Re: add a0 format to language to print trimmed character variables
- Previous by thread: add a0 format to language to print trimmed character variables
- Next by thread: Re: add a0 format to language to print trimmed character variables
- Index(es):
Relevant Pages
|
|