The reason I think is that the anti-Goto brigade (of which I'm a fervent member) when posting, is aiming our comments at newcomers to programming
I understand that, but the problem with that approach is that when you say 'don't use goto' the newcomers pick that up and just repeat it. There's no 'why' to it - just 'don't'.
Perhaps a better approach is to say 'there's no need for goto here because of a, b and c', or 'the do...loop structure does what you are doing there with goto', or 'just put an if around that code instead of jumping past it' (like in blastwave mans code above yours - thanks for the example BWM

).
If someone can't write programs without using Goto, then it's usually because they haven't been told a better way to do it.
I think I just agreed with that, at least for the most part

Connected with the problem is that newcomers to coding don't realise that when they are coding, they aren't just communicating with the compiler to produce an executable - they are communicating with themselves 6 months or more into the future.
Using a goto to implement a loop is almost invisible in the code. Using a do/loop, while/endwhile, repeat/until or for/next actually tells you something as soon as you see it.
do...loop: this is an infinite loop
while...endwhile: if this condition is true, execute the block until it isn't (execute 0 or more times)
repeat...until: execute this block until this condition is true (always execute once)
for...next: execute this block with an increasing/decreasing counter (execute a fixed number of times)
goto: who knows? Could be any of the above or none of them.
Using a goto instead of one of the loop constructs provides no benefits - you gain no speed increases, and you definitely lose readability.
Now for what I consider a legitimate uses of goto:
- exiting from a set of deeply nested loops.
- jumping to common error-recovery code.
- jumping to common cleanup code.
Note that these two uses of goto involve a jump forwards through the code (error recovery and cleanup are usually combined, so will be near the end of a function or subroutine), so won't result in spaghetti.
I can't ever remember using a goto to jump backwards through code (except maybe in batch scripts), and I can't think of any circumstances where I would do that, but that doesn't mean I won't do it if it makes the code clearer - I'd certainly add a comment of the fact that it jumps backwards.
Incidentally, there now seems to also be a rise in the number of posts from people saying you
shouldn't use Gosub and you should always use functions instead - though I don't see the logic in that argument
The only thing that I can think of (and it's the reason that my personal preference is to use functions) is that it's too easy to clobber your global and top-level variables by accident. I've also noticed today that duplicate labels are not spotted by the compiler - the last one in the code is used. Perhaps that's another reason.