My way of dealing with huge routines is to wrap them inside precompiler blocks.
Now, I can include that source in any other program of mine, for use basically as a library file, and it's NOT going to get added to the compiled EXE. It's going to be skipped over and excluded by default.
IF I want to make use of that routine, I'd need to add one line to the top of my source:
I've set my routines to be excluded by our built in precompiler, until we specifically specify to include them in our source. This method ensures that ONLY the code I need is included in my EXE, making it as small as possible with QB64PE.
Code: (Select All)
$IF CENTER_TEXT_USED THEN
SUB CenterText(x$, where)
'centering routine
END SUB
$END IF
Now, I can include that source in any other program of mine, for use basically as a library file, and it's NOT going to get added to the compiled EXE. It's going to be skipped over and excluded by default.
IF I want to make use of that routine, I'd need to add one line to the top of my source:
Code: (Select All)
$LET CENTER_TEXT_USED = TRUE
I've set my routines to be excluded by our built in precompiler, until we specifically specify to include them in our source. This method ensures that ONLY the code I need is included in my EXE, making it as small as possible with QB64PE.