comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: reading an ascii file efficiently
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: reading an ascii file efficiently [message #68894] Mon, 30 November 2009 06:50 Go to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
nata wrote:
> On Nov 27, 10:27 pm, Heinz Stege <public.215....@arcor.de> wrote:
>> On Sat, 28 Nov 2009 04:16:35 +0100, Heinz Stege wrote:
>>> pos=strpos(rr,',',/reverse_search)
>>> result=float(strmid(rr,transpose(pos)))
>> Oh no, it doesn't work this way. We have to exclude the comma from
>> the string:
>>
>> pos=strpos(rr,',',/reverse_search)
>> result=float(strmid(rr,transpose(pos)+1))
>
> It doesn't work... Check a simple example :
> rr=['a,b,c','a,b,c']
> pos=strpos(rr,',',/reverse_search)
> print, strmid(rr,pos+1,99)
>
> You have to do it for each component of the string array... Is not the
> best solution, thanks anyway
> nata

you forgot to transpose the pos array

print, strmid(rr,transpose(pos+1),99)

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Larger arrays or more dimensions?
Next Topic: SHAPEFILE changes in IDL7.1?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 12:39:40 PDT 2025

Total time taken to generate the page: 0.47956 seconds