Re: string stuff
- From: GaryScott <garylscott@xxxxxxxxxxxxx>
- Date: Fri, 9 Oct 2009 08:15:40 -0700 (PDT)
On Oct 7, 10:26 am, Bart Vandewoestyne
<MyFirstName.MyLastN...@xxxxxxxxxx> wrote:
On 2009-10-07, dpb <n...@xxxxxxx> wrote:I didn't quite understand why you could not simply add a second
Any suggestions on how to do this?
idx = index(ps_string, 'pulse', back=.true.) + len('pulse')+1
left_str = ps_string(1:idx-1)
rite_str = ps_string(idx:len_trim(ps_string)
Sorry... i forgot to mention that the text 'pulse' can also be
something else and with a different length... so the above trick
doesn't work for me.
if (idx .eq. 0) then
idx = index(ps_string, 'somehthingelse', back=.true.) +len
('somethingelse')+1
....
i.e. if you don't find a 'pulse' then keep checking for the alternate
key words...
Regards,
Bart
--
"Share what you know. Learn what you don't."
.
- Follow-Ups:
- Re: string stuff
- From: Richard Maine
- Re: string stuff
- References:
- string stuff
- From: Bart Vandewoestyne
- Re: string stuff
- From: dpb
- Re: string stuff
- From: Bart Vandewoestyne
- string stuff
- Prev by Date: Re: Connecting Fortran code to TCP/IP socket
- Next by Date: Re: string stuff
- Previous by thread: Re: string stuff
- Next by thread: Re: string stuff
- Index(es):
Relevant Pages
|