|
Prev | Next |
src_example.omh in the
xam directory
with the following contents:
$begin src_example$$
$spell
inline src srcfile py newline
$$
$section Example Inclusion of Source Code$$
$head Inline Source Code$$
The following is an example of in-line source code
$srccode%cpp%
extern std::set< std::string > string_set(const char* c_string);
%$$
$head Contents of src_example.py$$
Note that a newline is automatically added at the beginning
of a file:
$srcfile%omh/getstarted/src_example.py%5%$$
$head Escape Character$$
Change the escape character from $code #$$ to $code !$$
so $code #$$ can be used normally as part of the start
and stop sequences:
$escape !$$
$head Just Usage Message$$
Note that the newline following
$code # BEGIN USAGE$$ is included:
$srcfile%omh/getstarted/src_example.py%
5%# BEGIN USAGE%# END USAGE%0
%$$
$childtable%omh/getstarted/src_example.py%$$
$end
You can also just copy src_example.omh from the
omh/getstarted directory
.
omh/getstarted/src_example.py from the
omh/getstarted Directory
to the
xam directory
.
In the copy of src_example.omh, change
omh/getstarted/src_example.py to src_example.py.
src_example.
src_example.omh
part of the OMhelp help web site by selecting src_example
.