AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Students should be able to describe how data is passed to a subroutine…
Full specification wording
Structured programming and subroutines (procedures and functions): Students should be able to describe how data is passed to a subroutine using parameters.
A parameter is a named value in a subroutine's definition that receives data when the subroutine is called.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 3 of 9
Study notes
From the checked teaching notes for this specification point.
The idea
A parameter is a named value in a subroutine's definition that receives data when the subroutine is called. The calling routine supplies an argument, and the argument's value is bound to the matching parameter, so the subroutine body works on that copy or reference rather than on a hard-coded value. For example, a procedure defined to accept a radius can be called with different radii, and each call passes its own value into the parameter. Parameters make subroutines reusable and keep the calling code in control of the data. Describe the mechanism: the call supplies arguments, the definition lists parameters, values are matched in order, and the subroutine then uses them.
What earns the marks
- A parameter is a named variable declared in the subroutine definition that receives a value when the subroutine is called.
- An argument is the actual value or variable supplied by the calling routine at the point of the call.
- On a call, arguments are matched to parameters, typically in the order they are listed, and the parameter takes that value inside the subroutine.
- Parameters allow the same subroutine to be reused with different data instead of hard-coding values.
- The subroutine body uses the parameter as a local name for the passed data, so the calling routine controls what is processed.
Common mistakes and how to put them right
Confusing parameter with argument.
Put it right: State which appears where.
Thinking data is passed automatically without a call.
Put it right: , explain that the calling routine must supply arguments when it invokes the subroutine.
Assuming parameters are global variables.
Put it right: , parameters are local to the subroutine and receive their value at the call.
Exam tips
- Use the words parameter and argument precisely and say where each appears.
- Give a short example call and name which part is the argument and which is the parameter.
- Explain the order of matching and that the subroutine then uses the received value.
Try the lesson
The start of the Structured programming and subroutines (procedures and functions): Students should be able to describe how data is passed to a subroutine using parameters. lesson, made from checked teaching notes for this specification point.
Have a go first
A programmer writes a procedure called printScore that needs the value of a player's score before it can display it. How is the score value made available inside printScore when the procedure is called?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Structured programming and subroutines (procedures and functions): Students should be able to describe how data is passed to a subroutine using parameters.
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge