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

Home » Public Forums » archive » It seems that there is *a bit* polymorphism in IDL.
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: It seems that there is *a bit* polymorphism in IDL. [message #40544 is a reply to message #40464] Wed, 11 August 2004 20:05 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Amen to this! In fact, generalized GetProperty functions
> are so easy to write and so useful for obtaining any *single*
> object property, that *all* your objects should have one, along
> with the usual GetProperty procedure. :-)
>
> http://www.dfanning.com/tips/getproperty.html

OK, IDL 6.1 arrived this afternoon, so here is a programming
quiz for all of you who are not currently Members in Good
Standing with IEPA (http://www.dfanning.com/misc_tips/iepa.html).
(This includes all of you who have forgotten to pay your
dues this month.)

Use the SCOPE_VARNAME function with the REF_EXTRA keyword
to write a short general purpose GETPROPERTY *procedure* method
that'll return any member variables referenced via
keyword names

o -> GetPoperty, member_1 = member_1, member_2 = member_2, etc.

where object "o" has fields

self.member_1
self.member_2
etc.

Now you don't need a separate, functional, form of GetProperty!

The usual case of Bavarian Beer for the first correct answer. :-)

Cheers,

David

P.S. Entries will be stamped with a UTC time stamp by the US Naval
Observatory as they arrive, unless a small check accompanies the
entry, etc.

--
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multiple IDL versions
Next Topic: black window on fsc_surface & fsc_surface_log?

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

Current Time: Sun Nov 30 07:14:22 PST 2025

Total time taken to generate the page: 0.40235 seconds