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

Home » Public Forums » archive » Re: select first n elements of array without loop
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: select first n elements of array without loop [message #72018 is a reply to message #72017] Wed, 04 August 2010 13:06 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fermiona Fermiona writes:

> If I have an array and I want to select say, the first n elements
> thereof, can I do so without using a loop.
>
> For example if I want to select all the elements, I'd use an *

subarrar = array[0:n]

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How to increase array size by 1
Next Topic: Setting UNIX 'group' from IDL?

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

Current Time: Sat Oct 11 10:10:58 PDT 2025

Total time taken to generate the page: 1.44223 seconds