Does it really matter? DBP
usually highlights the line with the error; and for when it sometimes doesn't, it joins all the .dba's together and then outputs that as filename.dbsource; It's a simple job to open this and just jump to the line number it's reported the error on to find out where the error is.
And for the record, I tend to organise all my projects like this...
main.dba
//**************************************************************************
//
// Example Code Layout for TGC Forum post
//
//**************************************************************************
// Comments and notes relevent to the project here as well as detailing any
// plugins/dependencies
//**************************************************************************
//**************************************************************************
// Initialise Modules
//**************************************************************************
// initialise example module
gosub initExampleModule
//**************************************************************************
// Main loop
//**************************************************************************
do
// check which part of the loop is run
select system(0).loopMode
case 0
// Main menu
endcase
case 1
// The game
endcase
case 2
// game over
endcase
case 99
// exit safely
exit
endcase
endselect
// update screen
sync
loop
//**************************************************************************
// Tidy up and put away
//**************************************************************************
// function here to remove media, dll's, close any open files etc
// and then end to stop function overrun
end
moduleName.dba
//**************************************************************************
// Example Module source code
//**************************************************************************
// Comments and dependencys notes specific to this module, maybe some docs
// as to how the functions are to be used
//**************************************************************************
initModuleName:
//**************************************************************************
//
// Variables
//
//**************************************************************************
//**************************************************************************
// Constants
//**************************************************************************
//**************************************************************************
// Types
//**************************************************************************
//**************************************************************************
// Dimmed arrays
//**************************************************************************
//**************************************************************************
// Assign values
//**************************************************************************
//**************************************************************************
// Other setup stuff
//**************************************************************************
return
//**************************************************************************
//
// Functions
//
//**************************************************************************
//**************************************************************************
// functionName() - function description
//**************************************************************************
function exampleFunction(writing$ as string)
local result as integer : result=0
print writing$
endfunction result
Just my opinion tho, I have no formal training or anything; this is just what works for me