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

Home » Public Forums » archive » Re: overload init function in class/object ?
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: overload init function in class/object ? [message #34981 is a reply to message #34980] Tue, 06 May 2003 13:34 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1921c851ec23ee94989b86@news.frii.com...
> paul wisehart (wisehart@runbox.com) writes:
>
>> (So technically speaking you _cannot_ overload functions in
>> IDL? You just use optional parameters to get the same effact?)
>
> Isn't that a distinction without a difference?

Not to someone who's used to C++. In that language you can have several
versions of the same function, differing only in the number (and/or type?)
of their arguments. The compiler examines the argument list at each place in
the code where the function is called and dispatches the call to the
appropriate version. Because the decision is made at compile time (C++ being
a statically typed language) it is more efficient than doing run-time checks
inside the function in the IDL manner. But less flexible.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[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
Previous Topic: sec : U Re: checking for Demo mode
Next Topic: Interpolation from a regular to an irregular grid?

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

Current Time: Sun Oct 12 15:02:29 PDT 2025

Total time taken to generate the page: 0.55697 seconds