Raster
Feedback

Bug? Missing data? Anything else you want to let us know?

Subroutines

nonceptualism, 2023 — on objkt
Platforms
objkt
Description

A subroutine is a named section of code that can be called by writing the subroutine's name in a program statement. Subroutines can also be referred to as procedures or functions. A procedure is a set of instructions that will be executed when the procedure is called, whilst a function also contains a set of instructions that will be executed when the function is called and it will also return a value when it has finished executing.

Using subroutines makes the code more readable and reusable, as the code is broken into smaller sections. Most programming languages come with a standard library of built-in subroutines to perform common functions, but also have the capability to allow the programmer to write their own custom subroutines.