qb45advr.hlp (Topic list)
Modules
  Modules and Procedures   Modules   Contents   Index
──────────────────────────────────────────────────────────────────────────────
Modules
 
BASIC programs consist of one or more modules. A module is a source file
that can be separately compiled.
 
A module may contain SUB and FUNCTION procedures, as well as code not
directly part of a SUB or FUNCTION. Statements that are not part of a SUB
or FUNCTION are called module-level code. Module-level code includes
declarative statements like DIM and TYPE as well as error-handling and
event-handling code.
 
A program has one special module, the main module. The main module contains
the entry point of the program (the place where the program starts
running). Each program contains only one main module. In the main module,
module-level code corresponds to what is often called the main program.