Prev Next src_example

Example Inclusion of Source Code

Inline Source Code
The following is an example of in-line source code

     extern std::set< std::string > string_set(const char* c_string);

Contents of
Note that a newline is automatically added at the beginning of a file:
     #! /usr/bin/python3
     import sys
     usage = ' value'
     # END USAGE
     if len(sys.argv) != 2 :
     value  = float( sys.argv[1] )
     square = value * value
     output = 'value * value = ' + str(square)

Escape Character
Change the escape character from # to ! so # can be used normally as part of the start and stop sequences:

Just Usage Message
Note that the newline following # BEGIN USAGE is included:

     usage = ' value'

Input File: getstarted/src_example.omh