Skip to content
Design Corner Knowledge Base ← Back to designcorner.co.ke
Knowledge Base

Software and Development

Subroutine

Also known as: Function, Procedure

1 min read Updated November 10, 2026

Definition A named block of code that does one task and can be used repeatedly.

What it is

A subroutine, also called a function, is a named block of code that does one task. Instead of writing the same instructions many times, a programmer writes them once as a subroutine or function and calls it when needed.

Why it matters for your business

It keeps code shorter and makes fixes simpler.

Real-world example

A function that calculates VAT is used on every invoice.

Design Corner tip

Ask developers to reuse functions, which means one fix updates everywhere.