[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
why gambas3 add automatically variable declaration?
[Thread Prev] | [Thread Next]
- Subject: why gambas3 add automatically variable declaration?
- From: roberto.premoli@xxxxxxxxxx
- Date: Thu, 25 Jun 2026 20:16:10 +0200
- To: <user@xxxxxxxxxxxxxxxxxxxxxx>
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
| Re: why gambas3 add automatically variable declaration? | Fabien Bodard <gambas.fr@xxxxxxxxx> |
| Re: why gambas3 add automatically variable declaration? | Bruce Steers <bsteers4@xxxxxxxxx> |