Recursion

Download vba eBook

Introduction

A function that calls itself is said to be recursive. Recursive logic can often be implemented as a loop, too. Recursion must be controlled with a parameter, so that the function knows when to stop recursing and deepening the call stack. Infinite recursion eventually causes a run-time error '28': "Out of stack space".

See Recursion.

Remarks

Recursion allows for repeated, self-referencing calls of a procedure.

Related Examples

Stats

58 Contributors: 2
Thursday, March 2, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook