Subroutines - Static Global Functions
Functions - Variable Data
although personally i'll almost always go for functions, there are sometimes a good call for Subroutines - and DBP's architecture means that #include files work just like they do in other languages so you no longer have to think of them as just pure function plugins.
the way i tend to use Subroutines now is a little more creative than i used to...
something like
the function
function Control( x as float, z as float, a as float, s as float )
if upkey()=1 then x=newxvalue(x,a,s) : z=newzvalue(z,a,s)
if downkey()=1 then x=newxvalue(x,a,-s) : z=newzvalue(z,a,-s)
endfunction
the subroutine
_Control:
if upkey()=1 then x=newxvalue(x,a,s) : z=newzvalue(z,a,s)
if downkey()=1 then x=newxvalue(x,a,-s) : z=newzvalue(z,a,-s)
return
certainly is just a waste of a function... remember that subroutines are just code jumps rather than seperate entities, this means that everything that you can use in them can be already declared and you don't have to worry about new instances being created.
The only real reason to use a function in that case would be because you require multiple control instances - even then just changing who uses the standard x,z,s values would be simpler and quicker.
however Subroutines are actually a little more versatile than you'd think for example
function Command( )
if Private<>0 then goto Public
global Private as boolean
Private:
Private = 1
text 0,0,"Running Private Code"
wait 1000
Public:
text 0,0,"Running Public Code"
wait 1000
endfunction
you couldn't do that just using functions, and certainly not as simple or cleanly anyways

Anyone who uses C++ will not doubt dawn that they actually use SubRoutines alot within thier Class Function hehee, as DBP uses then the EXACT same way as C++ does. Makes them alot of fun to use.
you can also have multiple Subroutines with the same name in this fashion - perhaps when they add "Static" as a variable type for functions, so we can have a Local but Constant Variable until the program ends
Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!