Circular Reference

What Does Circular Reference Mean?

A circular reference in computer programming is a situation in which two values reference each other. This type of reference can be extremely problematic if two functions or values depend on one another for definition. This term is used in the IT world much like it is in general language to refer to when one thing references another and vice versa.


Techopedia Explains Circular Reference

An example of circular reference in programming is in a Microsoft Excel spreadsheet. Excel involves adding to or operating on various cells with functions that target specific cell ranges. In some cases, two different entries in Microsoft Excel can come to depend on each other for calculation, creating a circular reference. This can create a deadlock situation that makes calculations impossible. To mitigate this kind of situation, Microsoft has included a circular reference feature on the application’s toolbar. This helps users to identify and remove a circular references.

A circular reference is also problematic in programming, and may occur where a function returns a given result that is used by another function to return the same result. In some cases, this will simply provide useless code. In other situations, it may create a deadlock or crash a program.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…