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

Home » Public Forums » archive » Re: Retrieving elements of function returns
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: Retrieving elements of function returns [message #41816 is a reply to message #41815] Thu, 25 November 2004 05:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Panter writes:

> Bit of an odd request this. I've recently found that I can take the
> nth element of a returned array by enlosing the function in brackets and
> then appending an array subscript:
>
> n_pix=(size(grid))[1]
>
> which is a bit neater than
>
> n_pix=size(grid)
> n_pix=n_pix[1]
>
> I've had a look though the online help, and I can't decide if this is a
> reasonable thing to do or not -- primarily I'm concerned that this is
> some sort of undocumented feature which may disappear in later versions.
>
> Can someone reassure me that it's ok?!

Oh, this is perfectly OK, although the syntax does become
a bit C-ish for some people's taste. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Retrieving elements of function returns
Next Topic: Sonograms in IDL?

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

Current Time: Sun Oct 12 09:42:47 PDT 2025

Total time taken to generate the page: 0.95770 seconds