Why not Goto?

Blitz3D Forums/Blitz3D Beginners Area/Why not Goto?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

There is a thing called structured programming. Look it up.

Goto's arent as evil as some people make out. They were more evil in the past when you couldn't see the entry point for them (cos we used line numbers instead of labels). But also they don't have a defined exit point.

The main point is that you don't need to ever use Goto's, so why use them?

Gosub's are less evil because they have an exit point, but they are again, unnecessary. Use functions instead.

It is still there for the sake of completion. If I remember right in the first beta version of Blitz, it didn't have Gotos and Mark had to do some serious coding to get them in after some users kicked up a fuss.