Writing exam answers about procedures and functions
Keyword in a FUNCTION header giving the data type of the value sent back, e.g. FUNCTION Area(r : REAL) RETURNS REAL. End with ENDFUNCTION. Never use CALL for a function.
Understanding Writing exam answers about procedures and functions in IGCSE Computer Science Paper 2
What it does: Procedures are started using CALL followed by the name and brackets. They carry out a task without returning a value. A function call is used as part of an expression, such as an assignment, because it gives back a value. CALL is never used for a function. A function starts with FUNCTION and must finish with ENDFUNCTION. ENDPROCEDURE only closes a procedure. RETURN is the statement in the body. RETURNS appears only in the header to give the data type. The key difference is that a function returns a value, whereas a procedure does not. The second answer describes a global variable. A local variable exists only within the subroutine where it is declared.
Common mistakes: The function header must use the keyword RETURNS (with an S) before the data type. It should be FUNCTION Pi() RETURNS REAL. RETURN is only used inside the body to send the value back. A procedure must be closed with ENDPROCEDURE, not ENDFUNCTION. Each block ends with the keyword that matches the one that started it.
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 439–448) and word search (Modules 439–458).
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
RETURNSFill in the Blanks
Spot the Error
Student with a class code? Join your class →