A qBeta program is a singular object like the object Bank as described in the previous section.
A qBeta module is also a singular object. (a description of a singular object).
qBeta modules are organized in a nested structure of such singular objects.
The top module is called QBETAworld — in the current version of QBS it is actually called BETAworld, but this will be changed.
The organization of QBETAworld is described in this Section of the Reference Manual. You may also read about modules in Section 19 in the OOPM book.
As said, each module is placed in a folder that has the same name as the module and this folder contains a file that aslo has this name with extension .qbeta.
In the following $QBETAworld is supposed to represent the path to the directory containing QBETAworld.
The qBeta compiler has as switch for generating a new module. The next example shows ho to create a module MyModule with the module workspace.
cd $QBETAworld/workspace
qbeta --new MyModule
This will create a folder MyModule within workspace, and this folder wil have a file MyModule.qbeta
You may now edit the file MyModule.qbeta.
To compile and execute this module, do the following:
cd MyModule
qbeta MyModule
The above command wil use the interpreter written in Beta. To use the interpreter written in C, use the -c option:
qbeta -c MyModule


