AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Describe the use of parameters to pass data within programs.

    Full specification wording

    Structured programming and subroutines (procedures and functions): Describe the use of parameters to pass data within programs.

    A parameter is a named variable in a subroutine's definition that receives a value when the subroutine is called.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 2 of 9

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    A parameter is a named variable in a subroutine's definition that receives a value when the subroutine is called. The value supplied at the call is the argument. Parameters let one subroutine work on different data each time, so the same code is reused instead of rewritten. For example, a procedure defined to take a name and an age can be called with different pairs of values, and inside the subroutine those parameters behave like local variables holding the passed data. This keeps subroutines general, reduces duplication and makes programs easier to test and maintain. Parameters also define the interface: the number and order of values a caller must supply.

    What earns the marks

    • A parameter is a named variable declared in the subroutine definition that receives a value when the subroutine is called.
    • The value passed at the call site is the argument; the parameter holds that value inside the subroutine.
    • Parameters allow the same subroutine to operate on different data on different calls, supporting reuse.
    • Inside the subroutine, parameters act like local variables and can be used in expressions and output.
    • The parameter list defines how many values, and in what order, a caller must supply.
    • Passing data by parameter avoids duplicating code and makes programs easier to maintain and test.

    Common mistakes and how to put them right

    • Confusing parameter with argument.

      Put it right: State which appears where.

    • Thinking a parameter is a global variable.

      Put it right: Describe their scope as local.

    • Believing parameters are optional decoration.

      Put it right: Explain that they carry data into the subroutine.

    Exam tips

    • Use the words parameter and argument precisely and say where each appears.
    • Give a short concrete example of a definition and a call to show data being passed.
    • Link parameters to reuse and maintainability rather than only defining the term.

    Try the lesson

    The start of the Structured programming and subroutines (procedures and functions): Describe the use of parameters to pass data within programs. lesson, made from checked teaching notes for this specification point.

    Have a go first

    A subroutine is defined as calculateArea(length, width). What is the role of length and width in this definition?

    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.

    Carry on with the full lesson

    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): Describe the use of parameters to pass data within programs.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge