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 #76178 is a reply to message #76171] Fri, 20 May 2011 10:28 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris Torrence writes:

> If you have IDL 8.1, you can now use multiple indices with List and
> Hash. The first index gets the actual list (or hash) element, while
> the remaining indices are used to index into the returned array. So in
> your case, you could simply do:
> print, splitnames[27,3]
> This would take the 28th element of the list and extract the 4th
> string. You can also use the usual array ranges, *, etc.

Well, I have IDL 8.1 and this certainly doesn't work:

IDL> print, splitnames[*,2]
% Multiple list elements cannot be indexed.

This works:

IDL> print, splitnames[3,2]
c2

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: Wed Oct 08 19:55:01 PDT 2025

Total time taken to generate the page: 0.01467 seconds