While I can use the IncludeFile function in my programs to avoid cutting and pasting, it makes my programs a lot larger than they could be.
If I need only one function (say: GetDriveSpace), then I have two choices:
#1 - Copy the routine to the clipboard and paste it into my program
#2 - use IncludeFile "Utilities.pb" in my program (where GetDriveSpace) is located.
------------------------------------------------------------
To keep PureBasic programs as small as possible, I think PB might explore the following:
#1 - Read the user's file and find all the "IncludeFile" functions
#2 - Create a temporary Include.pb file in the program's directory.
#3 - Paste ONLY the functions used in the programmers code file
#4 - Compile the user's code using the temporary Include.pb file
The result would be smaller PB programs.
-------------------------------------------------------------
For example, I created a program:
Code: Select all
IncludeFile "C:\PureBasic\Util.pb"
MessageRequester("","Hello World",0)
End
with first line...................... EXE size = 39k
Big difference, and I have a "small" Include file.
Regards,
--blueb