Where to save modules?

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
CharlieM
Registered User
Registered User
Posts: 211
Joined: Wed Oct 10, 2007 12:05 am

Where to save modules?

Post by CharlieM » Thu Oct 11, 2007 2:17 am

Hi everyone,
I have been trying to make a few of my own modules,but keep getting can't find or can't open module.I have sort of read through the help,but don't seem to see anything related to where the compiler looks for the modules. I have it saved in the projects directory.
Last edited by CharlieM on Fri Oct 12, 2007 11:54 am, edited 1 time in total.
Running version 2.2.4.0 ICC 1.2.1.0
Regards CharlieM

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Thu Oct 11, 2007 6:43 am

You should find a folder My Documents/Swordfish/UserLibrary to store them in. Otherwise, check the View/Editor Options tab to find default location of files.

Regards,

Steve

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Oct 11, 2007 11:14 am

Compile will search for modules in the following order..

(a) in the folder that contains the main program
(b) the user library folder
(c) the system library folder

Make sure that if you include a module, like this

Code: Select all

include "MyModule.bas"
the module has the module keyword included, right at the top. For example,

Code: Select all

module MyModule
dim 
   a,b,c as byte
...

CharlieM
Registered User
Registered User
Posts: 211
Joined: Wed Oct 10, 2007 12:05 am

Post by CharlieM » Thu Oct 11, 2007 1:16 pm

Thanks Guys. :D
Running version 2.2.4.0 ICC 1.2.1.0
Regards CharlieM

Post Reply