As in C++, each Larch/C++ specification file is a module.
(Note that a class is not a module,
but may sometimes be the only thing in a module.)
A module may include other modules,
using the usual
#include syntax of C++.
A module may also contain
statements about what trait(s) to use, and specifications.
It was an early convention, still preserved in many examples,
to have the names of a Larch/C++ specification file ends in the suffix
For example `date.lcc' might be the name of a file that contained
the module specifying the class
However, this is no longer, strictly speaking, necessary.
Now one may use any suffix desired, such as `date.h' or `date.lh'.
One of these is more appropriate if the specification can also be used
directly as a C++ header file.
As in C++, declarations in a module may be hidden or exported.
A hidden declaration should be marked with the C++ keyword
Exported declarations should not be so marked.
See section 9 Specification Modules for an example.
#include mechanism has the same semantics as C++
(see section r.16 of [Stroustrup91]).
The Larch/C++ tools use a C++ preprocessor as
a first phase, exactly as in C++.
While Larch/C++ uses the C++
one does not necessarily have to use separate "header" modules
for Larch/C++ specifications.
Typically Larch/C++ specification will be found in C++ header modules.
Go to the first, previous, next, last section, table of contents.