Code block
To format a block of code with SPLDOC markup, indent each line of code by four or more spaces or by pressing the Tab key.
The indent is computed relative to the first line of text in the comment block, or
in the cell of a table, or to the markup in the first line of an enclosing list. The indent for a
code block must be at least four spaces from the start of the first line of text. When tabs are used
to indent a code block, the position of the first line of text can determine whether you need to use
one tab or multiple tabs. For
example:
/**
* First line of text.
*
* A code block:
*
* x = x + 1;
* y = x;
*/
- Format for a block of code
- The following example from the model file of the LinuxPipe primitive operator shows a formatted
block of code. Each line is indented by at least four
spaces.
<description> The `LinuxPipe` operator runs a Linux pipe command on the contents of the input stream and emits the results from `stdout` and (optionally, `stderr`) on one or two output streams. **Example** An example invocation of the library is shown below: stream<rstring ln> Out = LinuxPipe(Src) { param command: "sed 's/Streams/InfoSphere Streams/g' | sed 's/Spade/SPL/g'"; } See [LinuxPipe.spl] for more examples </description>