Subroutine: meaning, definitions and examples

๐Ÿ’ป
Add to dictionary

subroutine

 

[ หˆsสŒb.ruหหŒtiหn ]

Noun
Context #1 | Noun

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

function, method, procedure.

Which Synonym Should You Choose?

arrow down
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.

  • The subroutine is called multiple times within the main 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.

  • The function calculates the square root of a number.
  • You should define the function before calling it.
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.

  • The procedure updates the user interface.
  • You should document what each procedure does.
method

Commonly used in object-oriented programming to describe a function that is associated with an object or a class.

  • The method initializes the class attributes.
  • You can call the method using the instance of the 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.

Word Frequency Rank

With rank #19,125, this word belongs to specialized vocabulary. While not common in everyday speech, it enriches your ability to express complex ideas.