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

Home » Public Forums » archive » Re: arrays as subscripts
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: arrays as subscripts [message #30792 is a reply to message #30780] Fri, 17 May 2002 07:52 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
"Marshall Perrin" <mperrin+news@arkham.berkeley.edu> wrote in message
news:ac1vi6$28r8$1@agate.berkeley.edu...
> David Fanning <david@dfanning.com> wrote:
>>
>> I = Where(A GT 0, count)
>> IF count GT 0 THEN BEGIN
>> bindex = b[i]
>> b[i] = c[bindex]
>> ENDIF
>
> He said a new array, though, for the last one, so something like
>
> newarr = fltarr(n_elements(B)) ; or whatever type of arr it is

A favorite trick of mine for making a cleared-out copy of an array (with the
same type) is:

newarr = Make_Array(Size=Size(B)) ; *whatever* type of arr it is!

Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Digital maintenance handbook
Next Topic: Re: Digital maintenance handbook

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

Current Time: Sat Oct 11 15:08:29 PDT 2025

Total time taken to generate the page: 0.71766 seconds