Re: [Gambas-user] Loop variable question
Brought to you by:
gambas
|
From: richard t. <rt...@in...> - 2019-02-05 05:03:52
|
Thanks, I suspected as much. Sadly, its not a short process - I'd hate to think how many thousands of lines of code... will take me weeks I guess. BTW anyway of quickly counting how many forms/modules etc and lines of code in a project? Regards richard On 5/2/19 3:30 pm, Fabien Bodard wrote: > 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 <rt...@in...> 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 >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > _______________________________________________ > Gambas-user mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user |