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

Home » Public Forums » archive » Null terminated strings
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: Null terminated strings [message #28812 is a reply to message #28738] Thu, 10 January 2002 06:57 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Craig Markwardt, craigmnet@cow.physics.wisc.edu writes:
> Struan Gray <struan.gray@sljus.lu.se> writes:
>> James Kuyper, kuyper@gscmail.gsfc.nasa.gov writes:
>>
>>> I'm still wonder how to best convert a null-delimited
>>> list of strings into an IDL string array
>>
>> Sounds like a job for supersonic HISTOGRAM and his
>> ever-eager sidekick REVERSE_INDICES.
>
> That's a good idea, although I think you can't avoid a FOR loop. In
> fact, it is my belief that by using REVERSE_INDICES to look at more
> than one bin in a histogram, you are *guaranteed* to use a FOR loop or
> equivalent.

Aahh. But in this case, you are only going to look at
one bin, and the first one at that - which avoids the usual
problem of having to step through the REVERSE_INDICES array.
I haven't tried it, but it might even be possible to force
Histogram to construct a histogram with just one bin. Then
you're laughing.

Of course, this is much the same as using where(),
except that as those who have read the HISTOGRAM
documentation know, it's faster doing it the non-obvious
way.

Mind you, on further reflection, I would probably just
adapt Malcolm Walters' idea to use array compares, which
in theory at least should be faster than either HISTOGRAM or
WHERE.

btext = byte(text)
btext = btext + 10B*(btext < 1B)
textarr = strsplit(string(btext), string(10B), /extract)



Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: WIDGET REALIZATION BUG in 5.5 ?
Next Topic: Re: Spherical Contour Plotting

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

Current Time: Sat Oct 25 21:37:24 PDT 2025

Total time taken to generate the page: 4.39686 seconds