Bennu Game Development

English Forums => Suggestions => Topic started by: Sandman on November 27, 2008, 12:38:41 PM

Title: [BUG] First process' publics seen as locals [FIXED]
Post by: Sandman on November 27, 2008, 12:38:41 PM
Seen as there is no bug report subforum, I thought I'd post it here:


import "mod_say"
import "mod_time"
import "mod_proc"

Local
   int loc = 1;
End

Process Another()
Public
   int pub = 2;
Begin
   Loop
       frame;
   End
End

Process Second()
Public
   int pub2 = 3;
Begin
   Loop
       frame;
   End
End

Process Main()
Private
   Another a;
   int b;
   int c;
Begin

   a = Another();
   b = Another();
   c = Second();

   say("a.loc = " + a.loc);
   say("b.loc = " + b.loc);
   say("a.pub = " + a.pub);
   say("b.pub = " + b.pub); // not possible, but compiles and runs! <- BUG!
   say("c.pub = " + c.pub); // not possible, but compiles! <- BUG!
                            // Returned is actually c.pub2 (logical: same offset and size)
   //say("c.pub2 = " + c.pub2); // not possible and doesn't compile (good)

   signal(a,S_KILL);
   signal(b,S_KILL);
   signal(c,S_KILL);

End


Output:
a.loc = 1
b.loc = 1
a.pub = 2
b.pub = 2
c.pub = 3
Title: Re: [BUG] First process' publics seen as locals
Post by: SplinterGU on November 27, 2008, 01:42:50 PM
hohoho! maybe because this publics are from first process...
cool! thanks...

yes, they'll don't must work...
Title: Re: [BUG] First process' publics seen as locals
Post by: SplinterGU on December 27, 2008, 02:56:09 AM

    say("b.pub = " + b.pub); // not possible, but compiles and runs! <- BUG!
    say("c.pub = " + c.pub); // not possible, but compiles! <- BUG!
                             // Returned is actually c.pub2 (logical: same offset and size)


This codes are fixed... I don't know if last fix (http://forum.bennugd.org/index.php?topic=356.0) do that this errors are fixes or other fix...

Then this bugs are fixed...

Thanks.
Title: Re: [BUG] First process' publics seen as locals
Post by: Sandman on December 27, 2008, 11:00:47 AM
Excellent!