Browse Definitions :
Definition

recursion

Contributor(s): Lee Savidge

In computer programming, a recursion (noun, pronounced ree-KUHR-zhion) is programming that is recursive (adjective), and recursive has two related meanings:

1) A recursive procedure or routine is one that has the ability to call itself. This usually means that it has the capability to save the condition it was in or the particular process it is serving when it calls itself (otherwise, any variable values that have been developed in executing the code are overlaid by the next iteration or go-through). Typically, this is done by saving values in registers or data area stacks before calling itself or at the beginning of the sequence where it has just been reentered.

2) A recursive expression is a function, algorithm, or sequence of instructions (typically, an IF, THEN, ELSE sequence) that loops back to the beginning of itself until it detects that some condition has been satisfied. Here is a simple example (using a made-up computer source language):

 

CODELINE1   N=0;      
CODELINE2   IF N=<10 THEN DO WRITE LETTER;   
CODELINE3   ELSE GOTO CODELINE6;
CODELINE4   N=N+1;
CODELINE5   GOTO CODELINE2;
CODELINE6   ...some other instruction

Here, the instructions labeled CODELINE2 through CODELINE5 are recursive until the condition of N having the value of 10. "IF N=<10" means "If N has a value less than 10." "N=N+1" means "Add 1 to the current value of N."

In mathematics, recursion has similar but more complicated meanings than it does when used in programming.

This was last updated in August 2005

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

File Extensions and File Formats

SearchCompliance

  • risk management

    Risk management is the process of identifying, assessing and controlling threats to an organization's capital and earnings.

  • compliance as a service (CaaS)

    Compliance as a Service (CaaS) is a cloud service service level agreement (SLA) that specified how a managed service provider (...

  • data protection impact assessment (DPIA)

    A data protection impact assessment (DPIA) is a process designed to help organizations determine how data processing systems, ...

SearchSecurity

  • NIST Cybersecurity Framework

    The NIST Cybersecurity Framework (NIST CSF) is a policy framework surrounding IT infrastructure security.

  • Port Scan

    A port scan is a series of messages sent by someone attempting to break into a computer to learn which computer network services ...

  • DMZ (networking)

    In computer networks, a DMZ (demilitarized zone), also sometimes known as a perimeter network or a screened subnetwork, is a ...

SearchHealthIT

SearchDisasterRecovery

  • business continuity plan (BCP)

    A business continuity plan (BCP) is a document that consists of the critical information an organization needs to continue ...

  • disaster recovery team

    A disaster recovery team is a group of individuals focused on planning, implementing, maintaining, auditing and testing an ...

  • cloud insurance

    Cloud insurance is any type of financial or data protection obtained by a cloud service provider. 

SearchStorage

Close