You are here

Overview

19 January, 2016 - 11:41

No standard for pseudocode syntax exists. However, there are some commonly followed conventions to help make pseudocode written by one programmer easily understood by another programmer. Most of these conventions follow two concepts:

  • Use indentation to show the action part of a control structure
  • Use an ending phrase word to end a control structure

The sequence control structure simply lists the lines of pseudocode. The concern is not with the sequence category but with selection and two of the iteration control structures. The following are commonly used ending phrase-words:

Table 10.1 Examples of common ending phrase-words

Control Structure

Ending Phrase Word

If then Else

Endif

Case

Endcase

While

Endwhile

For

Endfor

The Do While and Repeat Until iteration control structures don't need an ending phrase-word. We simply use the first word, then the action part, followed by the second word with the test expression. Here are some examples: