[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New warning from compiler about loop variables
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: New warning from compiler about loop variables
- From: brian <brian@xxxxxxxxxxxxxxxx>
- Date: Wed, 30 Sep 2026 08:16:44 -0700
- To: user@xxxxxxxxxxxxxxxxxxxxxx
I think I will do that I also discovered that if I use a variable in a loop declare, then later need a variable before the loop, and accidently use the same name as the loop bar when I assign a value it also creates a dim for it. On September 30, 2026 6:36:43 AM PDT, Lee <t.lee.davidson@xxxxxxxxx> wrote: >On 9/29/26 4:50 PM, Brian G wrote: >> On 9/29/26 08:30, Lee wrote: >>> On 9/29/26 11:17 AM, Jussi Lahtinen wrote: >>>> Ah, of course. You are right, it should give a warning. Or not allow to declare the variable again. >>> >>> Or actually make the variable local to the loop and give a warning about it being shadowed. >>> >>> >> I am attaching a little video to show i i think it happens so often >> >> I am getting about 10 warning for apps...lol >> > >There is a configuration setting, that I never even noticed before, that could solve this. >Go to Tools > Preferences > Code formatting. Turn off Local variable declaration. Every local variable will then need to be explicitly declared. > > >-- >Lee > >--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- >--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ---- > > ~~~Brian
| New warning from compiler about loop variables | Brian G <brian@xxxxxxxxxxxxxxxx> |
| Re: New warning from compiler about loop variables | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: New warning from compiler about loop variables | BB <adamnt42@xxxxxxxxx> |
| Re: New warning from compiler about loop variables | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
| Re: New warning from compiler about loop variables | brian <brian@xxxxxxxxxxxxxxxx> |
| Re: New warning from compiler about loop variables | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
| Re: New warning from compiler about loop variables | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: New warning from compiler about loop variables | Brian G <brian@xxxxxxxxxxxxxxxx> |
| Re: New warning from compiler about loop variables | Lee <t.lee.davidson@xxxxxxxxx> |