[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New warning from compiler about loop variables
[Thread Prev] | [Thread Next]
- Subject: Re: New warning from compiler about loop variables
- From: Lee <t.lee.davidson@xxxxxxxxx>
- Date: Tue, 29 Sep 2026 00:07:30 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 9/28/26 6:47 PM, Brian G wrote:
I have discovered that many many of my loop variables are duplicated I think there was a while where the code editor was adding a definition when you used the variable.. must be because i don't think i used a dim in most cases of a loop and there it was right at the top of the function... Does anyone else remember this happening?
Not sure what you mean by, "a while", as if the editor stopped doing that. To my recollection, it has been doing that for some time now.
If you do:
For x = 1 To 10
' do something
Next
and 'x' has not been previously declared, the editor will add the declaration.
If you do:
For x As Integer = 1 To 10
' do something
Next
the editor will not add the declaration.
--
Lee
--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
| Re: New warning from compiler about loop variables | BB <adamnt42@xxxxxxxxx> |
| New warning from compiler about loop variables | Brian G <brian@xxxxxxxxxxxxxxxx> |