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 #68903 is a reply to message #68902] Fri, 27 November 2009 19:58 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 28, 1:27 am, 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))
>
> Heinz

Cool. I thought about it before, but thought that kind of thing would
not work, because strmid would take the pos array to mean to extract
multiple arrays, instead of associating each element of pos with each
element of rr. I had not realised that it is its first dimension that
is taken as the stride, until I saw your post, and wondered how that
could work, and why you transposed pod.

Nice to know it, I probably have some loops that I get rid of now.
Looking at strmid's documentation, I say it should have been a bit
more clear about this point.
[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: Sat Oct 11 15:02:22 PDT 2025

Total time taken to generate the page: 1.47864 seconds