Functions and procedures
Functions and procedures
A subroutine is a named block of code that you can call from somewhere else in the program. Subroutines support decomposition because a large task is split into smaller parts that are easier to test, reuse and fix.
Step-by-step lessons on OCR AS Level Computer Science Subroutines, arrays, file handling and comments. Each one builds up to exam-style questions.