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

Home » Public Forums » archive » Re: Dealing with list created by STRSPLIT?
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: Dealing with list created by STRSPLIT? [message #76181 is a reply to message #76179] Fri, 20 May 2011 07:45 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Barry Lesht writes:

> What I can't seem to figure out is how to now extract one of these
> terms from the list element. That is, I'd like to end up with arrays
> that have the n subdir2s (for example). I've tried using the
> LIST::TOARRAY () feature but this fails for some mysterious reason
> with the message
>
> IDL> namearray=splitnames.ToArray()
> % LIST::TOARRAY: Unable to convert to type STRING: Element 798
> % Error occurred at: LIST::TOARRAY
> % $MAIN$
> % Execution halted at: $MAIN$
>
> Element 798 is no different from any of the elements in the list, by
> the way, but this is not the real problem (at least I don't think it
> is)
>
> There must be an easy way to do this; I'm not seeing it. Any help
> would be much appreciated.

I think you are going to have to figure out what is up
with element 798. You might want to use the MISSING
keyword in the ToArray method.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL Book Sale
Next Topic: Constant Size Array in Class Init

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

Current Time: Thu Oct 09 20:02:37 PDT 2025

Total time taken to generate the page: 8.71520 seconds