Am 22.06.2017 um 16:10 schrieb PICCORO McKAY Lenz:

> 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

I never understood the religious cruzification of Goto.

Sometimes I do things like:

If anyvar = Null then
   Goto EndAndExit
Endif

'Some or a lot of code ...
'Inside another break:

If anothervar = Null Then
   Goto EndAndExit
Endif


EndAndExit:
End

For that situations I find Goto very useful.

If I use Goto, I only use it to jump downwards. I for me found out that
jumping upwards is a jump to hell.

And if it is really useful (jumping upwards, very very seldom) then it
has to be heavily documented.


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
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

Reply via email to