For me - I find it's easier to maintain large programs when they're broken into smaller
modules. With PBP I break tried & tested routines off into include or .bas files.
Then the majority of main routines using these include files end up being smaller more
managable programs. So you're not scrolling through thousands of lines of code in the
main routine.
One of the best examples here would be to look at all the neat stuff produced by Darrel
Taylor. He writes enormous utility routines as .bas or include files.
One example is DT_INTS-18.bas. It's around 949 lines of code. If code is specific to a
main project, I'll leave it in the main program. Generic utilities I'll place in include files
and just reuse them in other programs.
Over time you'll build up large tried & tested utility routines that you'll rarely need to debug
or worry about anymore, so the main programs get a LOT easier to write, maintain & debug.
Bookmarks