What is routine? - Definition from WhatIs.com
Part of the Programming glossary:

In computer programming, routine and subroutine are general and nearly synonymous terms for any sequence of code that is intended to be called and used repeatedly during the executable of a program. This makes the program shorter and easier to write (and also to read when necessary). The main sequence of logic in a program can branch off to a common routine when necessary. When finished, the routine branches back to the next sequential instruction following the instruction that branched to it. A routine may also be useful in more than one program and save other programmers from having to write code than can be shared.

Typically, in assembler languages, a routine that requires some variable input can be encoded into a macro definition with a specified interface called a macro instruction . The programmer can then use a macro instruction instead of having to include and manage the branching to a routine. Macro definitions and instructions also tend to be shared among programmers for use in multiple programs, especially in software development projects.

In higher-level computer languages, many commonly-needed routines are prepackaged as function , which are routines with specified programming interfaces. Some functions can be compiled in line with other code. Other functions are compiled in as stub that make dynamic calls for system services during program execution. Functions are sometimes called library routines . The compiler and a set of library routines usually come as part of a related software development package.

In Windows and some other personal computer operating systems, the system routines for handling specific tasks such as interacting with specific I/O devices are called dynamic link library ( dynamic link library ) routines. These routines are dynamic because their files are not actually loaded into memory until the first time they are called.

A more recent term, procedure , is similar in meaning.

This was last updated in April 2005
Contributor(s): Selena Ozuna
Posted by: Margaret Rouse

Related Terms

Definitions

  • MATLAB

    - MATLAB is a fourth-generation programming language and numerical analysis environment used for matrix calculations, developing and running algorithms, creating user interfaces (UI) and data visuali... (WhatIs.com)

  • race condition

    - A race condition occurs when a device or system makes an attempt to perform two or more operations at the same time, but not in the proper sequence. (SearchStorage.com)

  • MapReduce

    - MapReduce is a software framework that allows developers to write programs that process massive amounts of unstructured data in parallel across a distributed cluster of processors or stand-alone co... (searchCloudComputing.com)

Glossaries

  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question. Find an Answer.Powered by ITKnowledgeExchange.com

Ask An IT Question

Get answers from your peers on your most technical challenges

Ask Question

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.