C is different. You can replace goto in C, but in mirc scripting...
You said that there are cases in mIRC where goto
can't be replaced with if, else, elseif. I said I've never seen such thing, though I didn't say you can't use goto. Goto is obsolete in practically any case, makes code harder to read, lacks logic etc.
Though, in some cases I actually prefer goto, for example in dialog creation or for something like this:
alias tmsg {
goto $$1
:A | return msgchan
:B | return msgteams
:C | return msgchl
:D | return msgdcctriv
:E | return msgchat $2
:F | return msgnotice $2
}
The parser doesn't have much work as it jumps immediately to the given parameter, and returns the ID so that the script knows where to output its data. It would have more work if say the input is F, because then it would have to go through each if-check to see what the parameter is.
Apart from this I'd never use goto, however everyone has his own style, which differs from bad to good. Nevertheless it's their own style, so they decide how they want to code.
@sparta: Imo scripting that way so that people can't rip your code sounds like an aweful excuse. People are going to rip anyway, whether it is badly or well coded. I actually learnt a lot from reading other people's code, and I'm very glad I looked at good snippets which used code in decent ways. Btw this is no attack towards you or anything, I have nothing against you, like I said, you decide how you want to code.
Greets