On Thu, 22 Jun 2017, PICCORO McKAY Lenz wrote: > 2017-06-22 10:00 GMT-04:00 Jussi Lahtinen <jussi.lahti...@gmail.com>: > > > Usually the problem with goto is that it can render the code hard to debug > > or read. > > > AH OK, so in large complex dependences must be avoid.. > > i only use to avoid a similar to this: > > if isnull(value ) then > ' amount of 4000 lines of code > > else > ' amount of other lot of lines > endif > > so i put > > if not isnull() > goto codepiecelabel1 > endif > ' amount of lines > > codepiecelabel1: > ' here the 4000 lines > > > i cannot use a sub procedures due manage some variables >
This is excessive. Maybe you can think about if your variables can be put into a meaningful class. An object of this class contains all your relevant variables and you can pass a reference of that object (as a container for the variables) to a function. If there's no sensible grouping of variables into classes but you don't have dozens of variables, then you could try ByRef [1]. Regards, Tobi [1] http://gambaswiki.org/wiki/doc/byref -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user