Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12913 Members
Join this group to post and comment.

Recursive functions and circular functions

Hi,
Is is true that recursive functions are also called as circular functions?
If yes, then what is the basis?
Ankita Katdare • Aug 30, 2015
@proffy From what I remember from my textbooks, by definition -
A recursive function or subroutine is a method which calls itself to do part of the work. Since that can be imagined as a circle or represented by a flowchart that goes on and on, they might be called circular functions.

circle or represented by a flowchart that "goes on and on"

See, the recursive function cannot be a circular function because even if there is a call to function itself, it does not happen indefinitely. There is always a base case (or condition) from where the function is supposed to exit in one way or the other (either by displaying some message or returning some value).

So, is calling recursive function, a circular function not a misnomer ?
proffy
circle or represented by a flowchart that "goes on and on"

See, the recursive function cannot be a circular function because even if there is a call to function itself, it does not happen indefinitely. There is always a base case (or condition) from where the function is supposed to exit in one way or the other (either by displaying some message or returning some value).

So, is calling recursive function, a circular function not a misnomer ?