0478 · 0984 · 2210 · 9618

Cambridge Pseudocode

Cambridge pseudocode is the language in the Computer Science syllabuses for IGCSE (0478 and 0984), O Level (2210) and AS & A Level (9618). Keywords are written in capitals. A value is assigned with <-, and not-equal is <>. This site runs that language. It is not the official Cambridge guide.

A program in the language

DECLARE names the variable and its type before it is used. INPUT stops and waits. OUTPUT prints. IF needs THEN, and the block closes with ENDIF on its own line.

DECLARE Score : INTEGER
OUTPUT "Enter the score"
INPUT Score
IF Score >= 50 THEN
    OUTPUT "Pass"
ELSE
    OUTPUT "Fail"
ENDIF

One language, two courses

IGCSE and O Level use DECLARE, constants, arrays, procedures, functions, and text files. A Level 9618 adds records, dates, BYREF, random-access files and classes. The IGCSE pseudocode compiler runs the IGCSE subset. The 9618 pseudocode guide covers what A Level adds. Both run in the same pseudocode editor.

Where to read the syntax

The Cambridge pseudocode guide lists DECLARE, DIV, ROUND, constants and the rest of the statements. New to Paper 2, start with the O Level tutorial, then the Paper 2 Path. To check an answer against tests, use practice.