Unfortunately I have a bad new for your case.
There is two reasons for that.

- This coding way was really dangerous because many things cas appen to
your variable even during the loop time.

- Benoit have to remove  this ability to resolve a conflit on the new Just
In Time Compiler.

So you  have to walk your code

But its not so long

Just comment the variable in the header
'Private MyVar as type
And add it  in the fuctions
Dim MyVar as type.

We win also the ability to declare var every were in the code.
Even :

for myVar as Integer = 0 to 10
Next

Regards,
Fabien Bodard




Le mar. 5 févr. 2019 04:53, richard terry <rte...@internode.on.net> a
écrit :

> Hi List,
>
> Recently after a few  years I upgraded a machine to Mint 19.1 and latest
> ppa stable gambas.
>
> My long running code won't run properly .... wherever I have a loop
> variable  which was declared  in the general declarations at the top of
> the form rather than in a sub, an error comes up saying 'loop variable
> can't be global'.
>
> Has this changed in Gambas in recent times to make things stricter or is
> there a setting I can switch on to allow the old code to run, or do I
> have to go through my whole program and fix my bad coding.
>
> Thanks
>
> Richard
>
>
>
>
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to