a gosub is a function with no parameters and a global scope (the variables are visible all over the program), there is no reason why you can`t call a gosub from more than one place
, I don`t know who said that, but that was how they where originaly used, the whole point of a SUBROUTINE was to package commonly used bits of code and just reuse them with the one call from anywhere in the program, the downside is that you have to have unique variable names for your subroutine as they share the same space as the main program.
thats why FUNCTIONS where created, with a function, once you have made it you can use the same code in different programs just like a compiler/language function, with the advantage that you don`t have to worry about the variable names sharing values with the rest of your code, so whatever value X has in your function is different to whatever X is in the main code, so you can do this...
for X=1 to 380 step 10
print "main loop X is ";X
otherX()
next X
wait key
function otherX()
X=rnd(200000)
print "functions X is :";X
endfunction
as you can see if you run this, the function retains a different idea of what X is to what the main loop does, this allows you to make functions and never worry about accidentaly using the same variable in your main code, since one can`t corrupt the other, you can do exactly the same code with just GOSUB
for X=1 to 380 step 10
print "main loop X is ";X
gosub otherX
next X
wait key
otherX:
Y=rnd(200000)
print "functions X (actualy Y) is :";Y
return
but in this case you need to keep the names seperate or you will corrupt one or other of the variables in your code, this can cause hard to find errors, whoever told you can/should only call a subroutine from one location in a program is wrong/mistaken, until functions appeared inside BASIC (it didn`t always have them) the only way to have function like features was to use gosubs, thats normal and accepted practice, call em from wherever you like, basicaly, use functions wherever you can and gosubs where you want to do something like load variables or create and fill arrays, read data statements etc (since doing this in a function would make the variables created only available to that function), then try to organise your code so that all your main loop does is make decisions and call the right functions this makes your code easier to follow eg.
if man_in_lava() then player_on_fire(lava)
if player_bullet_hit_head(opponent) then announce_headshot(announcer)
etc
much easier to read, you can even write the whole main loop and then fill out the functions one by one until the whole code is working perfectly (my prefered routine...code some...test it...code some...test it...slow, but it makes for fairly sound code)
I don`t care what you say, theres no way the commander of a Kamakasi Squadron got promoted up through the ranks.