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

Home » Public Forums » archive » Re: function signature
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 signature [message #51129 is a reply to message #51127] Fri, 27 October 2006 16:21 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Dominic wrote:
> Hi,
>
> Is there a way to add signatures to user written function and
> procedures? So that validation of method calls are made at compile time
> vs. run time?
>
> example:
>
> pro foo, bar
> ...
> end
>
> some calls in his code:
> pro calling_foo
> foo ;without the bar parameter
> end
>
> So, is there a way when calling_foo is compile that it will catch this
> error at compile time as a syntax error?

But it's not a syntax error. The "bar" parameter might be optional (it
is up to the "foo" routine to determine what it needs).

On the other hand,

pro foo
...
end

pro calling_foo
foo, bar
end

is a syntax error.

Mike
--
www.michaelgalloy.com
[Message index]
 
Read Message
Read Message
Previous Topic: Re: cw_dual_slider: a slider with two slides
Next Topic: Re: Image and ROI Help

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

Current Time: Fri Oct 10 03:37:11 PDT 2025

Total time taken to generate the page: 0.14180 seconds