what is the differents

Blitz3D Forums/Blitz3D Beginners Area/what is the differents

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.

A subroutine, as the name suggests, allows you to parcel away bits of code that might otherwise clutter up your source... handy for your main loop where reading through a list of thoughtfully named subroutines (rather than the raw code they contain, all in a big heap) can help keep things clear. Or for instances where you might want to reuse code without repeating it inline.

Functions can take values, manipulate them and return a value - so you can apply the same process to any variables/objects you please (within the bounds of what makes syntactic sense) whereas a subroutine can only affect the variables/objects that it is hard-coded to alter.

Each has their place, I think - does Max have subs yet? ;D