Re: How to quote the " character in a format statement?
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Wed, 30 Jan 2008 23:10:17 +0000 (UTC)
In article <c706bb0b-6fc4-409f-b487-8519cf2326ac@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Mirko.Vukovic@xxxxxxxxx writes:
Hi,character(len=5) :: s = 'abcde'
This is a follow-up on my previous post, as it relates to generating
valid TecPlot files.
Given a vector of strings, I need to print out a string of the
following form (with the quote characters in it).
"string1" "string2" "string3"
I was trying along the lines of
"4('magic'A5'magic')"
but I could not quite figure out what the magic would be.
My other alternative is to modify the string's by prepending and
appending the quotes.
Any other opinions?
write(*,'(A)') '"' // trim(s) // '"'
write(*,1) trim(s)
1 format('"',A,'"')
end
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- Follow-Ups:
- Re: How to quote the " character in a format statement?
- From: Mirko . Vukovic
- Re: How to quote the " character in a format statement?
- References:
- How to quote the " character in a format statement?
- From: Mirko . Vukovic
- How to quote the " character in a format statement?
- Prev by Date: Re: passing a variable number of args/vectors to a routine
- Next by Date: Re: Allocatable Arrays As Outputs
- Previous by thread: How to quote the " character in a format statement?
- Next by thread: Re: How to quote the " character in a format statement?
- Index(es):
Relevant Pages
|