Alderson loop
In computer programming, an Alderson loop is a type of infinite loop, where there is an exit condition available, but inaccessible in the current implementation of the code. Typically this is created while debugging user interface code.
Examples
- When there is a menu stating, “Select 1-3 or 9 to quit” and 9 is not allowed by the function that takes the selection from the user.
<source lang="php"> $i = 1; while (true) {
// We forget to increment $i. if ($i > 10) break;
} </source>
Notable Alderson loops
This term supposedly received its name from a programmer who had coded a modal message box in MSAccess with no Ok or Cancel buttons, thereby disabling the entire program whenever the box came up. The message box had the proper code for dismissal and even was set up so that when the non-existent Ok button was pressed the proper code would be called.[1]
See also
References
- ^ Alderson Loop The Jargon File, Version 4.4.7. Accessed 21 May 2006. (Public Domain)
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)





