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 #87145 is a reply to message #87137] Fri, 10 January 2014 07:28 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi Andry,

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

Cheers,
Chris
ExelisVIS
[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 16:05:01 PDT 2025

Total time taken to generate the page: 0.00202 seconds