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

Home » Public Forums » archive » Function with something like [2:*] as input
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: Function with something like [2:*] as input [message #87146 is a reply to message #87145] Fri, 10 January 2014 07:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris Torrence writes:

> If you really wanted to get fancy, and you have IDL 8.0 or later, you could use operator overloading. You could create an object class that is a subclass of IDL_Object, and then implement the _overloadBracketsRightSide method. Then you could do things like:
>
> myfunc = MyFunctionClass()
> a = myfunc[1:3] ; looks just like array indexing!
>
> See the examples at:
> http://www.exelisvis.com/docs/Overloading_the_Array_In.html

Right. I was going to mention that just after I explained the value of
using positional and keyword parameters. ;-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Download files from the web
Next Topic: NITER in MPFITFUN

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

Current Time: Wed Oct 08 20:08:45 PDT 2025

Total time taken to generate the page: 0.23848 seconds