Procedures and functions, parameters, arrays, and string manipulation.
Subprograms
A subprogram is a named block of code:
- Procedure — performs a task.
- Function — performs a task and returns a value.
Benefits: reuse, decomposition, easier testing and maintenance. Parameters pass data in; functions RETURN results. Variables can be local (inside the subprogram) or global.
Viewing only
This content is free to read on superexams.com and cannot be printed or downloaded.
Read the full note — free
Create a free account to read this note in full. Every free account gets 2 complete revision notes — no card needed.