PC.net
HomeHome : Glossary : Definition
ShareShare

Recursion

Recursion Image

Recursion is a process in which a function calls itself as a subroutine. This allows the function to be repeated several times, since it calls itself during its execution. Functions that incorporate recursion are called recursive functions.

Recursion is often seen as an efficient method of programming since it requires the least amount of code to perform the necessary functions. However, recursion must be incorporated carefully, since it can lead to an infinite loop if no condition is met that will terminate the function.

Published: 2006

Definition from the PC Glossary
https://pc.net/glossary/recursion
space