Subroutine: meaning, definitions and examples
๐ป
subroutine
[ หsสb.ruหหtiหn ]
computer programming
A subroutine is a sequence of program instructions that perform a specific task, packaged as a unit. It is used to break down a program into smaller, more manageable pieces. Subroutines can be called multiple times within a program, allowing for code reusability.
Synonyms
Which Synonym Should You Choose?
Word | Description / Examples |
---|---|
subroutine |
It's often used in the context of early programming languages like Fortran, or when referring generally to a segment of code designed to perform a specific task within a larger program.
|
function |
This term is widely used in many programming languages to describe a reusable block of code that performs a specific task and often returns a value. It is applicable in both procedural and object-oriented programming.
|
procedure |
Generally used in the context of procedural programming languages like Pascal. It is a block of code that performs some operations and does not return a value.
|
method |
Commonly used in object-oriented programming to describe a function that is associated with an object or a class.
|
Examples of usage
- Before the main program can run, it calls the subroutine to initialize the required variables.
- The subroutine for sorting algorithm can be reused in different parts of the program.
Translations
Translations of the word "subroutine" in other languages:
๐ต๐น subrotina
๐ฎ๐ณ เคเคชเคเฅเคฐเคฎ
๐ฉ๐ช Unterprogramm
๐ฎ๐ฉ subrutin
๐บ๐ฆ ะฟัะดะฟัะพะณัะฐะผะฐ
๐ต๐ฑ podprogram
๐ฏ๐ต ใตใใซใผใใณ
๐ซ๐ท sous-programme
๐ช๐ธ subrutina
๐น๐ท alt program
๐ฐ๐ท ์๋ธ๋ฃจํด
๐ธ๐ฆ ุฑูุชูู ูุฑุนู
๐จ๐ฟ podprogram
๐ธ๐ฐ podprogram
๐จ๐ณ ๅญ็จๅบ
๐ธ๐ฎ podprogram
๐ฎ๐ธ undirlota
๐ฐ๐ฟ ััะบั ะฑะฐาะดะฐัะปะฐะผะฐ
๐ฌ๐ช แฅแแแแ แแแ แแแ
๐ฆ๐ฟ alt proqram
๐ฒ๐ฝ subrutina
Etymology
The term 'subroutine' originated in the early days of computing when programmers needed a way to reuse code and simplify program development. It has since become a fundamental concept in computer programming, enabling modular and efficient code design.
See also: routinely.