[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why gambas3 add automatically variable declaration?


hi Roberto,

You can disactivate this option in the parameters.... line two in code
formatting.

Best regards,
Fabien

Le jeu. 25 juin 2026 à 20:31, <roberto.premoli@xxxxxxxxxx> a écrit :

> hello all,
>
> gambas version: 3.18.0 (on Debian 12)
> problem: sometimes it happens that some global variable are automatically re-declared locally inside some pubblic sub function().
> Of course local variable take control diring whe woking time of the local ffunctiongoes to override the value of the same variable I set at the beginning of code in "declaration" session.
> this behaviour gave me headhache for one week for bug hunting (ok, my fault to not read the warning message during comping time).
> But really, i dont undestand this behaviour of gambas3. if a variable declaration is missed, is way long better that program stops and advise "declaration missing" or something like that: silent add of declaration is not the way in my opinion: coder must know he forgot to declare, gambas should not do it silently.
>
> if the variable ALREADY exist, why gambas add it silently and in automatic mode?
>
> there are same parameter to set into the gambas configuration to avoid this?
>
> There is some I did wrong?
> Thanks,
>
> Roberto
>
>

-- 
Fabien Bodard

References:
why gambas3 add automatically variable declaration?roberto.premoli@xxxxxxxxxx