goto skips declaration of variable

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 19 01:15:38 PDT 2014


nrgyzer:

> Sure, I can also use nested functions, but in my opinion it 
> results in dirty and complex code. It's totally overkilled 
> compared to a simple if and goto-instruction.

Often nested functions are less complex, more clean and simpler 
code compared to using gotos. I suggest to start using nested 
functions and see how they work out.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list