HelloWorld example of generated documentation

This HelloWorld example shows how you can document the SPL artifacts in an SPL file, including composite operators, functions, and types. The example shows an SPLDOC comment and the resulting documentation output for the HelloWorld composite operator.

SPLDOC comment for the HelloWorld example

The comment is delimited by /** and */. The asterisk ( * ) in each comment line is a decorator, and is not included in the documentation output. Compare the marked up text in the comment with the generated rich text documentation to see how SPLDOC markup works. To learn more about using SPLDOC markup, start by reviewing the Quick reference for SPLDOC markup.

/**
 * Outputs a stream of **hello world** greeting
 * messages. Each message in the stream contains
 * an `rstring` with the **hello world** message.
 * 
 * In the same way that a typical stream application
 * keeps running, this example runs *forever* and 
 * emits a greeting message until the application
 * is stopped.
 * 
 * The [getMessage(rstring)|getMessage] function
 * is invoked to format the greeting message.
 * 
 * The [Main] composite in this file provides 
 * an example invocation of the `HelloWorld` 
 * composite operator.
 * 
 * @output messages the stream of greeting messages.
 * @param name a name to be addressed by the
 * greeting message.
 */
composite HelloWorld(output messages) {
param 
  expression<rstring> $name;
graph  ...

Generated documentation for the HelloWorld example

This graphic shows the rich text documentation that is generated by the comment for the HelloWorld composite operator.

This image shows the rich text documentation that is generated for the HelloWorld composite operator.