Re: opening char variable data file
- From: "James Van Buskirk" <not_valid@xxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 13:01:42 -0600
"Richard Maine" <nospam@xxxxxxxxxxxxx> wrote in message
news:1i6ubud.csdpth15org8fN%nospam@xxxxxxxxxxxxxxxx
Stripping quotes is trivial, but I'm not feeling like writing sample
code for it right now. One might want to include a check to see whether
the string had quotes or not.
C:\gfortran\clf\strip_me>type strip_me.f90
program strip_me
implicit none
character quoted_string*(80), stripped_string*(80)
quoted_string = '"""A quoted string"""'
read(quoted_string, *) stripped_string
write(*,*) 'Quoted string: ', trim(quoted_string)
write(*,*) 'Stripped string: ', trim(stripped_string)
quoted_string = stripped_string
read(quoted_string, *) stripped_string
write(*,*) 'Quoted string: ', trim(quoted_string)
write(*,*) 'Stripped string: ', trim(stripped_string)
end program strip_me
C:\gfortran\clf\strip_me>c:\gfortran\win64\bin\x86_64-pc-mingw32-gfortran
strip_
me.f90 -ostrip_me
C:\gfortran\clf\strip_me>strip_me
Quoted string: """A quoted string"""
Stripped string: "A quoted string"
Quoted string: "A quoted string"
Stripped string: A quoted string
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
.
- References:
- opening char variable data file
- From: GT
- Re: opening char variable data file
- From: e p chandler
- Re: opening char variable data file
- From: *** Hendrickson
- Re: opening char variable data file
- From: Richard Maine
- opening char variable data file
- Prev by Date: Re: Stack corruption and memory leak problems in c++/Fortran application
- Next by Date: Re: Stack corruption and memory leak problems in c++/Fortran application
- Previous by thread: Re: opening char variable data file
- Next by thread: Re: opening char variable data file
- Index(es):