Procedures and functions
Cambridge IGCSE Computer Science (0478) · Unit 8: Programming · 10 flashcards
Procedures and functions is topic 8.3 in the Cambridge IGCSE Computer Science (0478) syllabus , positioned in Unit 8 — Programming , alongside Programming concepts and Data structures. In one line: A procedure (or subroutine) is a block of code that performs a specific task. Its primary purpose is to modularize code, making it reusable and easier to manage by breaking down larger programs into smaller, self-contained units.
This topic is examined in Paper 1 (computer systems theory) and Paper 2 (algorithms, programming and logic).
The deck below contains 10 flashcards — 9 definitions and 1 key concept — covering the precise wording mark schemes reward. Use the 9 definition cards to lock down command-word answers (define, state), then move on to the concept and application cards to handle explain, describe and compare questions.
The term 'procedure' in programming, and state its primary purpose
A procedure (or subroutine) is a block of code that performs a specific task. Its primary purpose is to modularize code, making it reusable and easier to manage by breaking down larger programs into smaller, self-contained units.
What the Cambridge 0478 syllabus says
Official 2026-2028 specThese are the exact learning objectives Cambridge sets for this topic. Match the command word (Describe, Explain, State, etc.) in your answer to score full marks.
- Understand Understand the purpose of storing data in a file to be used by a program
- Open Open, close and use a file for reading and writing including read and write single items of data and read and write a line of text
Define the term 'procedure' in programming, and state its primary purpose.
A procedure (or subroutine) is a block of code that performs a specific task. Its primary purpose is to modularize code, making it reusable and easier to manage by breaking down larger programs into smaller, self-contained units.
Explain the difference between a 'function' and a 'procedure'.
Both functions and procedures are reusable blocks of code. A function, unlike a procedure, *must* return a value after execution. Procedures may or may not return values.
What is a 'parameter' in the context of procedures and functions? Give an example.
A parameter is a variable that is passed into a procedure or function when it is called.
What is an 'argument' in the context of procedures and functions? How does it relate to a parameter?
An argument is the actual value that is passed to a procedure or function when it is called, corresponding to a parameter in the function definition. For
Explain what is meant by 'returning a value' from a function. Provide a simple example.
Returning a value means that a function sends a result back to the part of the code that called the function.
What is a 'local variable' and what is its 'scope'?
A local variable is declared inside a procedure or function. Its scope is limited to that procedure or function, meaning it can only be accessed within that block of code.
Describe a 'global variable' and its primary advantage and disadvantage.
A global variable is declared outside any procedure or function, accessible throughout the program. Advantage: facilitates data sharing between different parts of the code. Disadvantage: increased debugging complexity due to potential unintended modifications from anywhere in the program.
Define the term 'scope' in the context of variables.
Scope refers to the region of a program where a variable can be accessed. It determines the visibility and lifetime of a variable.
Explain the process of 'calling' a procedure or function.
Calling a procedure or function means executing the code within that block. This is done by using the procedure/function name followed by parentheses (containing arguments, if any).
What is a 'library' in programming, and how do procedures and functions relate to it?
A library is a collection of pre-written, reusable procedures and functions. It saves time by allowing programmers to use existing code for common tasks instead of writing it themselves.
Key Questions: Procedures and functions
Define the term 'procedure' in programming, and state its primary purpose.
A procedure (or subroutine) is a block of code that performs a specific task. Its primary purpose is to modularize code, making it reusable and easier to manage by breaking down larger programs into smaller, self-contained units.
What is a 'parameter' in the context of procedures and functions? Give an example.
A parameter is a variable that is passed into a procedure or function when it is called.
What is an 'argument' in the context of procedures and functions? How does it relate to a parameter?
An argument is the actual value that is passed to a procedure or function when it is called, corresponding to a parameter in the function definition. For
Explain what is meant by 'returning a value' from a function. Provide a simple example.
Returning a value means that a function sends a result back to the part of the code that called the function.
What is a 'local variable' and what is its 'scope'?
A local variable is declared inside a procedure or function. Its scope is limited to that procedure or function, meaning it can only be accessed within that block of code.
More topics in Unit 8 — Programming
Procedures and functions sits alongside these Computer Science decks in the same syllabus unit. Each uses the same spaced-repetition system, so progress in one informs the next.
Cambridge syllabus keywords to use in your answers
These are the official Cambridge 0478 terms tagged to this section. Mark schemes credit responses that use the exact term — weave them into your answers verbatim rather than paraphrasing.
Key terms covered in this Procedures and functions deck
Every term below is defined in the flashcards above. Use the list as a quick recall test before your exam — if you can't define one of these in your own words, flip back to that card.
How to study this Procedures and functions deck
Start in Study Mode, attempt each card before flipping, then rate Hard, Okay or Easy. Cards you rate Hard come back within a day; cards you rate Easy push out to weeks. Your progress is saved in your browser, so come back daily for 5–10 minute reviews until every card reads Mastered.
Study Mode
Space to flip • ←→ to navigate • Esc to close
You're on a roll!
You've viewed 10 topics today
Create a free account to unlock unlimited access to all revision notes, flashcards, and study materials.
You're all set!
Enjoy unlimited access to all study materials.
Something went wrong. Please try again.
What you'll get:
- Unlimited revision notes & flashcards
- Track your study progress
- No spam, just study updates