slang-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] wrong predeclaration makes function unaccessable


=?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> wrote:
>is this an expected behaviour?

Yes.

>
>#v+
>implements("gaga");
>
>static define foo();			% wrong behaviour
>% private define foo();			% correct behaviour
>
>static define bla()
>{
>    foo();
>}

When "bla" gets compiled, the only version of "foo" that is available
is the one that exists in the static namespace.  Hence it is the one
that gets linked to "bla".  And because the body of the function does
not exist, the function will do nothing when called.

--John

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]