Declaring a variable with DECLARE (8.1a)
Creates a variable called Counter that can only hold whole numbers. Use DECLARE name : TYPE, with a space either side of the colon, before you use the variable.
Understanding Declaring a variable with DECLARE (8.1a) in IGCSE Computer Science Paper 2
What it does: The pattern DECLARE identifier : data type creates a variable, here one that holds whole numbers. A value with a decimal part needs REAL. INTEGER can only hold whole numbers. BOOLEAN is the data type for TRUE and FALSE values. STRING is for text. Cambridge style puts a space either side of the colon: DECLARE name : TYPE. A variable must be declared before it is used. Assigning to Counter before the DECLARE is an error.
Common mistakes: BOOL is not a Cambridge pseudocode data type. The type must be written in full as BOOLEAN: DECLARE GameOver : BOOLEAN. The colon is missing between the identifier and the data type. It should be DECLARE TotalToPay : REAL.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 307–316) and word search (Modules 296–316).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
DECLARE Counter : INTEGERFill in the Blanks
Spot the Error
Student with a class code? Join your class →