Elements

DDC Style Guide: Pseudocode

Practices to rely on (and avoid) in pseudocode.

Symbols and types

Keywords and operators

Grammar and syntax

Formatting

Annotations

Depending on the intended audience, additional explanatory text annotations may help the reader to understand the pseudocode. When considering the inclusion of such annotations, please follow these guidelines:

The following example includes inline explanatory annotations with some of the statements. Each such annotation is written in parentheses immediately below the statement it explains, and follows the indentation structure of the pseudocode.