Gosub or functions?

Blitz3D Forums/Blitz3D Beginners Area/Gosub or functions?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

>> The key here is variable scope

Good point, FlameDuck. I must admit, however, that I still use Gosub for short programs, mostly because I use a handful of variables that I want to use globally, and I can't be bothered declaring them as such separately (poor excuse) or passing them into the function.

If I do anything serious or complicated I use functions.

I still think Goto has certain limited uses on rare occasions (like inside a function, for example). But its use should be minimized or you end up with confusing spaghetti code that is difficult to understand or debug.

>>The way I see it. if it works use it. NO programmer should be worried about how some one else is going to think of them because of their code.

Amen, Yavin. Unless you are working for someone else and perceptions matter. But we're mostly hobbyists around here.