[Gambas-user] Memory access error in gbc2

Benoit Minisini gambas at ...1...
Mon Sep 11 17:03:54 CEST 2006


On Sunday 10 September 2006 23:06, Mike Nought wrote:
> Hi all,
>
> after some testing i found the reason for the memory access error I wrote
> Benoit today.
>
> It occures if one tries to compile the following code:
>
> ----
> PRIVATE $stuff as String
>
> PUBLIC SUB bla(OPTIONAL notAllowed as String = $stuff)
> END
> ----
>
> I did not know that it is not possible to use global variables as standard
> for optional arguments of procedures. So it seems to be a rather silly bug,
> caused by too few documentation and a forgotten check ;)
> But this error nearly made me crazy this weekend.
>
> Sincerely,
> Franz
>

It will be fixed in the next version. Anyway, I'm not sure at the moment if 
optional argument could reliably be something other than a constant.

Regards,

-- 
Benoit Minisini





More information about the User mailing list