Programming · 4 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 4% of your exam marks.
Writing and calling procedures/functions with parameters is tested in Paper 2.
This comparison appears in almost every Cambridge IGCSE exam paper.
| Feature | Procedure | Function |
|---|---|---|
| Returns a value? | No | Yes |
| Keyword used to define | PROCEDURE ... ENDPROCEDURE | FUNCTION ... ENDFUNCTION |
Uses RETURNS in header? | No | Yes (RETURNS <data type>) |
Contains RETURN <value>? | Usually no | Yes (the value to send back) |
| How it is called | With CALL keyword | Used inside an expression (no CALL) |
| Typical use | Doing something (output, save, update state) | Calculating something and giving the value back |
| Example pseudocode call | CALL CalculateArea(5, 3) | Result ← CalculateArea(5, 3) |
CALL.