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

Home » Public Forums » archive » HASH question
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: HASH question [message #75454 is a reply to message #75367] Mon, 07 March 2011 13:02 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 7, 5:32 pm, Paolo <pgri...@gmail.com> wrote:
> Single stars can easily be located with where:
>
> ind=where(allstars.starID EQ 'Delta Pavonis',count)
> if count EQ 1 then print,'The magnitude of '+allstars[ind].starID+' is
> '+strtrim(allstars[ind].magnitude,2)

I would not call that "easily". The two problems are mentioned in the
first question: "but I don't a priori know how many stars I have, and
to find a particular star I'd have to search on the ID element."

The search is awkward and not efficient, the arrays cannot have
elements dynamically added or removed, and they would not avoid
repetitions (elements with the same key).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.0 image() scaling
Next Topic: Floating illegal operand error when reach end of for loop

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

Current Time: Wed Oct 08 20:13:34 PDT 2025

Total time taken to generate the page: 0.00376 seconds