Here is a self-contained sample to demonstrate
the problem.  Compile and link both prgs to
see how the public, not the static SameName()
is called:

sample1.prg
//-- cut
Function Main()

    SetMode( 25, 80 )
    cls

    ? "Starting up in Function Main"
    SameName()
    Another()

Return nil

Function SameName()

    ? "PUBLIC Function SameName in Sample1.prg"

Return .t.
//-- cut


sample2.prg
//-- cut
// this static function will never get called if it's the first in the prg!
Static Function SameName()

    ? "STATIC Function SameName in Sample2.prg"

Return .t.

Function Another()

    ? "Function Another in Sample2.prg, calling SameName"
    SameName()

Return .t.
//-- cut


Regards

On 13-06-2011 10:55, Luis Krause Mantilla wrote:
> Hi all:
>
> We have discovered a very weird problems.
>
> In one of the prg files of a huge app of ours we have as the
> very first function a STATIC Function called EditCell().
>
> We have such static function names throughout (about 4 of them).
> In just one other instance, a different prg has a function with
> the same name, but it's NOT a static.
>
> With the most current build from CVS though, instead of the
> expected STATIC EditCell() function to be called, it's the
> public one in another prg that gets called!
>
> This code has been like this for at least 8 years and it's just
> now we experience this problem.  The linker is still BCC 5.5.1.
>
> Any idea what changed in xharbour or why would it even be possible
> a static function on that same prg doesn't get called?
>
> Regards,
>

-- 
Luis Krause Mantilla
lkrausem at shaw dot ca
luis_krause at hotmail dot com
"May the Source be with GNU"


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to