Question 1
Learning objective
Subroutines (procedures/functions): Be familiar with subroutines and their uses. Know that a subroutine is a named ‘out of line’ block of code that may be executed (called) by simply writing its name in a program statement. Be able to explain the advantages of using subroutines in programs.
Read the explanation, check the common trap, then practise with flashcards and questions.
At a glance
0
Flashcards
0
Questions
Topic
Programming
Subtopic
Subroutines (procedures/functions)
Study support
Understand this objective
Quick explanation
Subroutines (procedures/functions): Be familiar with subroutines and their uses. Know that a subroutine is a named ‘out of line’ block of code that may be executed (called) by simply writing its name in a program statement. Be able to explain the advantages of using subroutines in programs
- This point belongs to Programming, especially Subroutines (procedures/functions).
- You need to be able to subroutines (procedures/functions): Be familiar with subroutines and their uses. Know that a subroutine is a named ‘out of line’ block of code that may be executed (called) by simply writing its name in a program statement. Be able to explain the advantages of using subroutines in programs.
- Use the linked flashcards and practice questions to check recall, then practise applying the idea in an exam-style answer.
Why it matters
This objective helps connect Subroutines (procedures/functions) to exam-style questions, flashcards, and revision notes for Programming.
Quick student answer
What is a subroutine?
Direct answer
A named out-of-line block of code that can be called
Key terms
- Subroutine: A named out-of-line block of code that may be executed by calling its name in a program statement.
- Call: The act of executing a subroutine by writing its name in a program statement.
Common trap
Confusing a subroutine with a variable: A subroutine is a named block of executable code. A variable and a subroutine have different purposes.
Related questions
Try this as a practice card
Question 1 of 4
Choose an answer, get feedback, then move sideways through the set.
Flashcard prompts
Flip through the key recall cards
Flashcard 1 of 4
Revision tools
Choose how to practise
Flashcards0 linked cards
Practice Questions0 linked questions
Related learning objectives
- Data types: Understand the concept of a data type. Understand and use the following appropriately: • integer • real/float • Boolean • character • string • date/time • pointer/reference • records (or equivalent) • arrays (or equivalent). Variables declared as a pointer or reference data type are used as stores for memory addresses of objects created at runtime, ie dynamically. Not all languages support explicit pointer types, but students should have an opportunity to understand this data type. Define and use user-defined data types based on language-defined (built-in) data types.
Data types
- Programming concepts: Use, understand and know how the following statement types can be combined in programs: • variable declaration • constant declaration • assignment • iteration • selection • subroutine (procedure/function). The three combining principles (sequence, iteration/repetition and selection/choice) are basic to all imperative programming languages. Use definite and indefinite iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure. A theoretical understanding of condition(s) at either end of an iterative structure is required, regardless of whether they are supported by the language being used. Use nested selection and nested iteration structures. Use meaningful identifier names and know why it is important to use them.
Programming concepts
- Arithmetic operations in a programming language: Be familiar with and be able to use: • addition • subtraction • multiplication • real/float division • integer division, including remainders • exponentiation • rounding • truncation. 42
Arithmetic operations in a programming language
- Relational operations in a programming language: Be familiar with and be able to use: • equal to • not equal to • less than • greater than • less than or equal to • greater than or equal to.
Relational operations in a programming language
- Boolean operations in a programming language: Be familiar with and be able to use: • NOT • AND • OR • XOR.
Boolean operations in a programming language
