Page 1 of 1

MODULES

Posted: Fri Feb 04, 2011 2:26 pm
by hubert
I have been working on making modules and since I haven't seen any information on it I thought I would post this information which I have learned by trial and error.

If anyone has anything to add or to clarify please do.
Module

The ?File? section has three buttons for making modules.
1. Save All; 2. Make a File 3. Load a File

To start a Module:
Press ?Make a File? in the ?File? section. Then Name the Module.
Use ?New Sub? to put subs in the Module. And press ?Save All?.
When you ?SaveAll? all the DECLARE SUBS in all modules will be done automatically.
The added module will only have the shared subs. The Main module will have all subs.
This is done automatically after ?Save All?
Can?t duplicate names.

To Share variables:
The COMMON and the COMMON SHARED are used to share variables between modules.
COMMON cat$,dog$
COMMON count%, total%
They have to be put into both the main module and the added module.
The COMMON SHARED is used when sharing variables in a sub and between modules.
Arrays are done differently
They have to be DIM SHARED and the DIM SHARED has to be placed before the COMMON.
DIM SHARED horse$(400)
COMMON horse$()