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 #76243 is a reply to message #76170] Mon, 23 May 2011 13:43 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On May 20, 2:46 pm, Barry Lesht <ble...@gmail.com> wrote:
> On May 20, 12:28 pm, David Fanning <n...@idlcoyote.com> wrote:
>
>
>
>
>
>
>
>
>
>> 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.")
>
> Thanks, David.  I'll see if Chris replies again and in the meantime
> install 8.1.
>
> Regards, Barry

I should have said "you can also use the usual array ranges, *, etc."
for the second and subsequent indices. The first index MUST be a
scalar.
-Chris
[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 16:12:33 PDT 2025

Total time taken to generate the page: 0.00522 seconds