Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Infinite loop
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Alderson loop=== ''Alderson loop'' is a rare slang or [[The Jargon File|jargon]] term for an infinite loop where there is an exit condition available, but inaccessible in an implementation of the code, typically due to a programmer error. These are most common and visible while [[debugging]] [[user interface]] code. A C-like pseudocode example of an Alderson loop, where the program is supposed to sum numbers given by the user until zero is given, but where the wrong operator is used: <syntaxhighlight lang="C"> int sum = 0; int i; while (true) { printf("Input a number to add to the sum or 0 to quit"); i = getUserInput(); if (i * 0) { // if i times 0 is true, add i to the sum. Note: ZERO means FALSE, Non-Zero means TRUE. "i * 0" is ZERO (FALSE)! sum += i; // sum never changes because (i * 0) is 0 for any i; it would change if we had != in the condition instead of * } if (sum > 100) { break; // terminate the loop; exit condition exists but is never reached because sum is never added to } } </syntaxhighlight> The term allegedly received its name from a programmer (whose last name is Alderson) who in 1996<ref>{{cite web |url=https://www.lee-dohm.com/2013/05/24/alderson-loop |title=Alderson loop |author=Lee Dohm |date=May 24, 2013 |access-date=January 22, 2020 |archive-date=June 19, 2020 |archive-url=https://web.archive.org/web/20200619200434/https://www.lee-dohm.com/2013/05/24/alderson-loop/ |url-status=live }}</ref> had coded a [[modal window|modal]] [[dialog box]] in [[Microsoft Access]] without either an OK or Cancel button, thereby disabling the entire program whenever the box came up.<ref>{{Cite web |url=http://www.catb.org/~esr/jargon/html/A/Alderson-loop.html |title=Alderson Loop |website=[[The Jargon File]], Version 4.4.7 |url-status=live |archive-url=https://web.archive.org/web/20060515053043/http://www.catb.org/~esr/jargon/html/A/Alderson-loop.html |archive-date=2006-05-15 |access-date=2006-05-21}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Infinite loop
(section)
Add topic