Re: Kat's goto

new topic     » topic index » view thread      » older message » newer message

Karl Bochert wrote:

> A sample of the syntax I will be using is:

> procedure foo()
>    ...
>    if ... then
>       ...
>       goto done
>    end if
>    ...
> :done:
> end procedure

'return' on its own does this unless you intend to put code between the
':done:' and the 'end procedure'. Even then you could use the 'while' trick
I mentioned previously.

Yes. I was brainwashed at University. I vehemently believe that GOTO can be
avoided in all situations, and if you find a situation where you think you
need one, you've followed the wrong path to get there - you need to
backtrack.

Carl

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu