|
My assumption from your description is that you are doing this in basic?
If so you have a couple of ways to approach it. You can include a file: #include "foo.bas" This is described on page 218 of the current syntax manual.
You can create projects. In the IDE it is Menu item (File\New Project). This creates a directory with one file in it. You then can create/add other files to the project. Note: projects more or less work like they are a simple file that includes the files listed in the project in the order they are listed in the project.
But unlike C there is no scoping of variables or definitions. That is once defined it is available from the point on in the file and subsequent files. If you use a variable in one file and use it again in another file, you can not define it twice... (been bit a few times here). So sometimes for library files that have some common functions that I wish to include in several projects, I end up using some naming convention to avoid these issues.
Good Luck. Kurt
P.S. - You can also create c/c++ projects. You can create libraries to include into your projects, but it is not clean and you need to edit some files and create the actual library outside of the IDE (I use makefile and command prompt)
|