[Gambas-user] Variable reinitialized at each iteration of a loop structure

Jussi Lahtinen jussi.lahtinen at gmail.com
Tue Mar 28 02:42:13 CEST 2023


I think "Dim b As Integer" should be the same as "Dim b As Integer = 0". I
consider this as a bug / unwanted feature.
If "Dim b As Integer" is equal to a local variable declared at the
beginning of a function/sub, then I think IDE should just move it there.

In C variables "a" and "b" would be out of scope (valid only within the
loop) and thus this would not compile and thus no confusion.


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230328/5eeb49fc/attachment.htm>


More information about the User mailing list