Knowledge

Infinite loop

Source 📝

1923: 423: 1434:
One common example of such situation is an email loop. An example of an email loop is if someone receives mail from a no reply inbox, but their auto-response is on. They will reply to the no reply inbox, triggering the "this is a no reply inbox" response. This will be sent to the user, who then sends
400:
are low-level synchronization mechanisms used in concurrent programming to protect shared resources. Unlike traditional locks that put a thread to sleep when it can't acquire the lock, spinlocks repeatedly "spin" in an infinite loop until the lock becomes available. This intentional infinite looping
413:
In multi-threaded programs some threads can be executing inside infinite loops without causing the entire program to be stuck in an infinite loop. If the main thread exits, all threads of the process are forcefully stopped, thus all execution ends and the process/program terminates. The threads
369:
There are a few situations when this is desired behavior. For example, the games on cartridge-based game consoles typically have no exit condition in their main loop, as there is no operating system for the program to exit to; the loop runs until the console is powered off.
1390:
An infinite loop may be caused by several entities interacting. Consider a server that always replies with an error message if it does not understand the request. Even if there is no possibility for an infinite loop within the server itself, a system comprising two of them
1382:: in order to compute a certain result, an iteration is intended to be carried out until the error is smaller than a chosen tolerance. However, because of rounding errors during the iteration, the specified tolerance can never be reached, resulting in an infinite loop. 333:, infinite loops normally caused the entire system to become unresponsive. With the now-prevalent preemptive multitasking model, infinite loops usually cause the program to consume all available processor time, but can usually be terminated by a user. 381:, for example, this outer loop was contained in the Exec program, and if the computer had absolutely no other work to do, it would loop run a dummy job that would simply turn off the "computer activity" indicator light. 1354:
Because of the likelihood of tests for equality or not-equality failing unexpectedly, it is safer to use greater-than or less-than tests when dealing with floating-point values. For example, instead of testing whether
1294:
values, and the way floating point values are represented in many computers will make this test fail, because they cannot represent the value 0.1 exactly, thus introducing rounding errors on each increment (cf. box).
384:
Modern computers also typically do not halt the processor or motherboard circuit-driving clocks when they crash. Instead they fall back to an error condition displaying messages to the operator (such as the
1742:
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
127:) is a sequence of instructions that, as written, will continue endlessly, unless an external intervention occurs, such as turning off power via a switch or pulling a plug. It may be intentional. 2211: 361:
Looping is repeating a set of instructions until a specific condition is met. An infinite loop occurs when the condition will never be met due to some inherent characteristic of the loop.
472:
While most infinite loops can be found by close inspection of the code, there is no general method to determine whether a given program will ever halt or will run forever; this is the
414:
inside the infinite loops can perform "housekeeping" tasks or they can be in a blocked state waiting for input (from socket/queue) and resume execution every time input is received.
373:
Modern interactive computers require that the computer constantly be monitoring for user input or device activity, so at some fundamental level there is an infinite processing
401:
is a deliberate design choice aimed at minimizing the time a thread spends waiting for the lock and avoiding the overhead of higher level synchronisation mechanisms such as
1752:
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:
2033: 546:), while in structured programming this is an indefinite loop (while loop) set to never end, either by omitting the condition or explicitly setting it to true, as 1286:
On some systems, this loop will execute ten times as expected, but on other systems it will never terminate. The problem is that the loop terminating condition
1603:
was a signed integer, rather than an unsigned integer, overflow would be undefined. In this case, the compiler could optimize the code into an infinite loop.
142:
This differs from "a type of computer program that runs the same instructions continuously until it is either stopped or interrupted". Consider the following
512:. However, this does not always work, as the process may not be responding to signals or the processor may be in an uninterruptible state, such as in the 2098: 2207: 2185: 2156: 2001: 945:
In some languages, programmer confusion about mathematical symbols may lead to an unintentional infinite loop. For example, here is a snippet in
446:. Such errors are most common by novice programmers, but can be made by experienced programmers also, because their causes can be quite subtle. 1367:, either of which would be certain to exit after a finite number of iterations. Another way to fix this particular example would be to use an 553:
Some languages have special constructs for infinite loops, typically by omitting the condition from an indefinite loop. Examples include Ada (
2251: 524:
can work, as they do not require the process to be responsive, while in other cases the loop cannot be terminated short of system shutdown.
2063: 465:
in the data structure, where one node links to another that occurs earlier in the sequence. This makes part of the data structure into a
2303: 2357: 2128: 102: 1104:" above, the = (assignment) operator was confused with the == (equality test) operator. Instead, this will assign the value of 5 to 2270: 2023: 1841:// if i times 0 is true, add i to the sum. Note: ZERO means FALSE, Non-Zero means TRUE. "i * 0" is ZERO (FALSE)! 1976: 1100:
The expected output is the numbers 0 through 9, with an interjected "a equals 5!" between 5 and 6. However, in the line "
488:
As long as the system is responsive, infinite loops can often be interrupted by sending a signal to the process (such as
325:
having no terminating condition, having one that can never be met, or one that causes the loop to start over. In older
2352: 1856:// sum never changes because (i * 0) is 0 for any i; it would change if we had != in the condition instead of * 130:
There is no general algorithm to determine whether a computer program contains an infinite loop or not; this is the
2235: 389:), and enter an infinite loop waiting for the user to either respond to a prompt to continue, or reset the device. 442:
Most often, the term is used for those situations when this is not the intended result; that is, when this is a
1588: 1200:
Unexpected behavior in evaluating the terminating condition can also cause this problem. Here is an example in
305:
will alternate being 2 or 1. The loop will not stop unless an external intervention occurs ("pull the plug").
1941: 1619: 1299: 95: 2088: 1612: 342: 2181: 2152: 817: 728: 346: 1368: 666: 655: 337:
loops are also sometimes called "infinite loops". Infinite loops are one possible cause for a computer
1997: 1911:
without either an OK or Cancel button, thereby disabling the entire program whenever the box came up.
1900:
The term allegedly received its name from a programmer (last name Alderson) who in 1996 had coded a
724:
Here the loop is quite obvious, as the last line unconditionally sends execution back to the first.
2327: 2247: 1501: 1201: 946: 582: 449:
One common cause, for example, is that a programmer intends to iterate over sequence of nodes in a
378: 330: 88: 402: 2367: 1889:// terminate the loop; exit condition exists but is never reached because sum is never added to 20: 2347: 466: 458: 2292: 1443:
A pseudo-infinite loop is a loop that appears infinite but is really just a very long loop.
1663:" loop looks infinite at first glance, but there may be a way to escape the loop through a 517: 427: 386: 116: 31: 24: 2121: 1579:
and adding 1 to that number will wrap-around to 0, breaking the loop. The actual limit of
8: 473: 2362: 2028: 1928: 1592: 1379: 780: 350: 930:
is assigned the value of 1 (regardless of any previous value) before it is changed to
1922: 1452: 2266: 1952: 1908: 1668: 496:
to the processor, causing the current process to be aborted. This can be done in a
461:, executing the loop code once for each node. Improperly formed links can create a 338: 326: 318: 2297: 1936: 1739: 1664: 477: 322: 131: 40: 1746: 1623: 1291: 513: 505: 489: 450: 1972: 2341: 2055: 542:
constructs. Most commonly, in unstructured programming this is jump back up (
435: 50: 1901: 1611:
Infinite recursion is a special case of an infinite loop that is caused by
1372: 858: 539: 533: 497: 443: 334: 75: 65: 2093: 942:
instruction outside the loop so that its initial value is set only once.
653:
for an infinite loop is traditional, appearing in the standard reference
509: 454: 2208:"A Buffer Overflow Exploit Against the DameWare Remote Control software" 2224:
As soon as the command shell is closed with a control-c combination ...
1904: 1571:
It appears that this will go on indefinitely, but in fact the value of
1125: 431: 143: 55: 2331: 1946: 1743: 1112:
will never be able to advance to 10, and this loop cannot terminate.
501: 493: 422: 374: 19:
This article is about the programming term. Not to be confused with
1584: 1497: 926:
will never be greater than 5, since at the start of the loop code,
397: 377:
that must continue until the device is turned off or reset. In the
60: 2122:"The History of Apollo On-board Guidance, Navigation, and Control" 521: 662:
This is a loop that will print "Infinite Loop" without halting.
2024:"Overload of Hangers-On Creates Bumpy Ride for Internet Stocks" 1375:, counting the number of iterations that have been performed. 1435:
an auto reply to the no-reply inbox, and so on and so forth.
938:= 2 and will never break. This could be fixed by moving the 847: 543: 516:(caused by overlapping uninterruptible instructions in an 1802:"Input a number to add to the sum or 0 to quit" 1672: 695: 576: 219:
By contrast, the following loop will not end by itself:
2075:
an infinite loop is one that lacks .. an exit condition
2056:"Codes and Modes: The Character of Documentary Culture" 1575:
will eventually reach the maximum value storable in an
30:"Endless loop" redirects here. Not to be confused with 1419:
does not understand the error message, it replies to
1918: 1491: 1431:, it sends yet another error message, and so on. 356: 2339: 1591:, this loop would continue until the computer's 538:Infinite loops can be implemented using various 206:continuously until it was stopped or interrupted 1949:(an infinite loop is one of two key components) 659:, and is often punningly pronounced "forever". 96: 2086:also known as non-preemptive-multitasking: 1427:does not understand the error message from 857:Here is one example of an infinite loop in 2182:"Halting Problem in Theory of Computation" 2119: 193:"the number of items counted = " 103: 89: 2169:computing .. a defect .. which .. to loop 1583:depends on the details of the system and 934:+ 1. Thus the loop will always result in 321:which loops endlessly, either due to the 2264: 1438: 1403:receives a message of unknown type from 848:Examples of unintentional infinite loops 421: 417: 1378:A similar problem occurs frequently in 520:). In some cases other signals such as 212:returned at some point by the function 2340: 2236:Ada Programming: Control: Endless Loop 2036:from the original on December 27, 2019 2021: 1998:"What is infinite loop (endless loop)" 852: 577:Examples of intentional infinite loops 469:, causing naive code to loop forever. 364: 1606: 1446: 1973:"Endless loop dictionary definition" 1385: 1108:at this point in the program. Thus, 2159:from the original on August 2, 2020 2127:. Charles Stark Draper Laboratory. 1359:equals 1.1, one might test whether 527: 317:is a sequence of instructions in a 301:will alternate being 1 or 2, while 13: 2273:from the original on June 19, 2020 2214:from the original on July 24, 2020 2188:from the original on 9 August 2020 2153:"New York Times Crossword Answers" 2101:from the original on July 26, 2019 2022:Caruso, Denise (August 16, 1999). 1654: 1115: 408: 14: 2379: 2321: 1411:replies with an error message to 2358:Programming language comparisons 2254:from the original on 2016-08-03. 1921: 1730: 1492:Impossible termination condition 1290:tests for exact equality of two 2306:from the original on 2006-05-15 2285: 2258: 2240: 2229: 2134:from the original on 2016-11-05 2066:from the original on 2020-08-01 2004:from the original on 2019-07-15 1979:from the original on 2020-08-01 1423:with its own error message; if 922:This creates a situation where 665:A similar example in 1980s-era 483: 438:got stuck in an infinite loop." 2200: 2174: 2145: 2113: 2080: 2048: 2015: 1990: 1965: 1589:arbitrary-precision arithmetic 357:Intended vs unintended looping 1: 2120:David Hoag (September 1976). 2089:"Non-preemptive Multitasking" 1958: 1942:Divergence (computer science) 1620:Visual Basic for Applications 614:// or equivalently, while (1) 392: 7: 1914: 1189:x = 1.20000016689300537109 1184:x = 1.10000014305114746094 1179:x = 1.00000011920928955078 1174:x = 0.90000009536743164062 1169:x = 0.80000007152557373047 1164:x = 0.70000004768371582031 1159:x = 0.60000002384185791016 1154:x = 0.50000000000000000000 1149:x = 0.40000000596046447754 1144:x = 0.30000001192092895508 1139:x = 0.20000000298023223877 1134:x = 0.10000000149011611938 137: 10: 2384: 656:The C Programming Language 531: 308: 29: 18: 2330:in several languages, on 2265:Lee Dohm (May 24, 2013). 1618:The following example in 1399:) may loop endlessly: if 836:"Infinite loop" 808:"Infinite Loop" 768:"Infinite Loop" 680:"INFINITE LOOP" 504:command, or by using the 500:, in a terminal with the 2353:Iteration in programming 1754: 1677: 1628: 1506: 1457: 1304: 1206: 951: 863: 821: 784: 732: 700: 671: 587: 379:Apollo Guidance Computer 331:cooperative multitasking 221: 148: 2248:"Endless loop in C/C++" 1298:The same can happen in 2332:programming-idioms.org 439: 21:Infinite Loop (street) 2328:Make an infinite loop 2210:. December 19, 2003. 1595:could no longer hold 1439:Pseudo-infinite loops 694:A similar example in 581:A simple example (in 425: 418:Unintentional looping 202:The same instructions 2155:. October 13, 2013. 518:instruction pipeline 428:blue screen of death 387:blue screen of death 117:computer programming 32:Endless Loop (album) 25:Infinite Loop (book) 1738:is a rare slang or 853:Mathematical errors 623:"Infinite Loop 365:Intentional looping 339:hanging or freezing 2184:. 3 October 2018. 2029:The New York Times 1929:Mathematics portal 1607:Infinite recursion 1447:Very large numbers 1380:numerical analysis 781:Bourne Again Shell 440: 214:is_there_more_data 163:is_there_more_data 2062:. November 2014. 1386:Multi-party loops 1251:"x = %22.20f 1198: 1197: 1062:"a equals 5! 555:loop ... end loop 351:access violations 341:; others include 327:operating systems 113: 112: 16:Programming idiom 2375: 2315: 2314: 2312: 2311: 2289: 2283: 2282: 2280: 2278: 2262: 2256: 2255: 2244: 2238: 2233: 2227: 2226: 2221: 2219: 2204: 2198: 2197: 2195: 2193: 2178: 2172: 2171: 2166: 2164: 2149: 2143: 2142: 2140: 2139: 2133: 2126: 2117: 2111: 2110: 2108: 2106: 2084: 2078: 2077: 2072: 2071: 2052: 2046: 2045: 2043: 2041: 2019: 2013: 2012: 2010: 2009: 1994: 1988: 1987: 1985: 1984: 1969: 1953:Infinite regress 1931: 1926: 1925: 1909:Microsoft Access 1896: 1893: 1890: 1887: 1884: 1881: 1878: 1875: 1872: 1869: 1866: 1863: 1860: 1857: 1854: 1851: 1848: 1845: 1842: 1839: 1836: 1833: 1830: 1827: 1824: 1821: 1818: 1815: 1812: 1809: 1806: 1803: 1800: 1797: 1794: 1791: 1788: 1785: 1782: 1779: 1776: 1773: 1770: 1767: 1764: 1761: 1758: 1726: 1723: 1720: 1717: 1714: 1711: 1708: 1705: 1702: 1699: 1696: 1693: 1690: 1687: 1684: 1681: 1669:return statement 1662: 1650: 1647: 1644: 1641: 1638: 1635: 1632: 1622:(VBA) returns a 1602: 1598: 1582: 1578: 1574: 1567: 1564: 1561: 1558: 1555: 1552: 1549: 1546: 1543: 1540: 1537: 1534: 1531: 1528: 1525: 1522: 1519: 1516: 1513: 1510: 1487: 1484: 1481: 1478: 1475: 1472: 1468: 1465: 1461: 1366: 1362: 1358: 1350: 1347: 1344: 1341: 1338: 1335: 1332: 1329: 1326: 1323: 1320: 1317: 1314: 1311: 1308: 1289: 1282: 1279: 1276: 1273: 1270: 1267: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1243: 1240: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1120: 1119: 1111: 1107: 1103: 1096: 1093: 1090: 1087: 1084: 1081: 1078: 1075: 1072: 1069: 1066: 1063: 1060: 1057: 1054: 1051: 1048: 1045: 1042: 1039: 1036: 1033: 1030: 1027: 1024: 1021: 1018: 1015: 1012: 1009: 1006: 1003: 1000: 997: 994: 991: 988: 985: 982: 979: 976: 973: 970: 967: 964: 961: 958: 955: 941: 937: 933: 929: 925: 918: 915: 912: 909: 906: 903: 900: 897: 894: 891: 888: 885: 882: 879: 876: 873: 870: 867: 843: 840: 837: 834: 831: 828: 825: 812: 809: 806: 803: 800: 797: 794: 791: 788: 775: 772: 769: 766: 763: 760: 757: 754: 751: 748: 745: 742: 739: 736: 720: 717: 714: 710: 707: 704: 690: 687: 684: 681: 678: 675: 652: 645: 642: 639: 636: 633: 630: 627: 624: 621: 618: 615: 612: 609: 606: 603: 600: 597: 594: 591: 572: 568: 564: 560: 556: 549: 548:while (true) ... 528:Language support 492:in Unix), or an 319:computer program 294: 291: 288: 285: 282: 279: 276: 273: 270: 267: 264: 261: 258: 255: 252: 249: 246: 243: 240: 237: 234: 231: 228: 225: 197: 194: 191: 188: 185: 182: 179: 176: 173: 170: 167: 164: 161: 158: 155: 152: 105: 98: 91: 37: 36: 2383: 2382: 2378: 2377: 2376: 2374: 2373: 2372: 2338: 2337: 2324: 2319: 2318: 2309: 2307: 2300:, Version 4.4.7 2298:The Jargon File 2293:"Alderson Loop" 2291: 2290: 2286: 2276: 2274: 2267:"Alderson loop" 2263: 2259: 2246: 2245: 2241: 2234: 2230: 2217: 2215: 2206: 2205: 2201: 2191: 2189: 2180: 2179: 2175: 2162: 2160: 2151: 2150: 2146: 2137: 2135: 2131: 2124: 2118: 2114: 2104: 2102: 2087: 2085: 2081: 2069: 2067: 2054: 2053: 2049: 2039: 2037: 2020: 2016: 2007: 2005: 1996: 1995: 1991: 1982: 1980: 1971: 1970: 1966: 1961: 1937:Cycle detection 1927: 1920: 1917: 1898: 1897: 1894: 1891: 1888: 1885: 1882: 1879: 1876: 1873: 1870: 1867: 1864: 1861: 1858: 1855: 1852: 1849: 1846: 1843: 1840: 1837: 1834: 1831: 1828: 1825: 1822: 1819: 1816: 1813: 1810: 1807: 1804: 1801: 1798: 1795: 1792: 1789: 1786: 1783: 1780: 1777: 1774: 1771: 1768: 1765: 1762: 1759: 1756: 1733: 1728: 1727: 1724: 1721: 1718: 1715: 1712: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1682: 1679: 1665:break statement 1660: 1657: 1655:Break statement 1652: 1651: 1648: 1645: 1642: 1639: 1636: 1633: 1630: 1609: 1600: 1596: 1580: 1576: 1572: 1569: 1568: 1565: 1563:/* loop code */ 1562: 1559: 1556: 1553: 1550: 1547: 1544: 1541: 1538: 1535: 1532: 1529: 1526: 1523: 1520: 1517: 1514: 1511: 1508: 1494: 1489: 1488: 1485: 1482: 1479: 1476: 1473: 1470: 1466: 1463: 1459: 1449: 1441: 1388: 1364: 1360: 1356: 1352: 1351: 1348: 1345: 1342: 1339: 1336: 1333: 1330: 1327: 1324: 1321: 1318: 1315: 1312: 1309: 1306: 1288:(x != 1.1) 1287: 1284: 1283: 1280: 1277: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1226: 1223: 1220: 1217: 1214: 1211: 1208: 1124:C output on an 1118: 1116:Rounding errors 1109: 1105: 1101: 1098: 1097: 1094: 1091: 1088: 1085: 1082: 1079: 1076: 1073: 1070: 1067: 1064: 1061: 1058: 1055: 1052: 1049: 1046: 1043: 1040: 1037: 1034: 1031: 1028: 1025: 1022: 1019: 1016: 1013: 1010: 1007: 1004: 1001: 998: 995: 992: 989: 986: 983: 980: 977: 974: 971: 968: 965: 962: 959: 957:<stdio.h> 956: 953: 939: 935: 931: 927: 923: 920: 919: 916: 913: 910: 907: 904: 901: 898: 895: 892: 889: 886: 883: 880: 877: 874: 871: 868: 865: 855: 850: 845: 844: 841: 838: 835: 832: 829: 826: 823: 814: 813: 810: 807: 804: 801: 798: 795: 792: 789: 786: 777: 776: 773: 770: 767: 764: 761: 758: 755: 752: 749: 746: 743: 740: 737: 734: 722: 721: 718: 715: 712: 708: 705: 702: 692: 691: 688: 685: 682: 679: 676: 673: 650: 647: 646: 643: 640: 637: 634: 631: 628: 625: 622: 619: 616: 613: 610: 607: 604: 601: 598: 595: 593:<stdio.h> 592: 589: 579: 570: 567:loop do ... end 566: 562: 558: 554: 547: 536: 530: 486: 478:halting problem 420: 411: 409:Multi-threading 395: 367: 359: 311: 296: 295: 292: 289: 286: 283: 280: 277: 274: 271: 268: 265: 262: 259: 256: 253: 250: 247: 244: 241: 238: 235: 232: 229: 226: 223: 199: 198: 195: 192: 189: 186: 183: 180: 177: 174: 171: 168: 165: 162: 159: 156: 153: 150: 140: 132:halting problem 109: 80: 41:Loop constructs 35: 28: 17: 12: 11: 5: 2381: 2371: 2370: 2365: 2360: 2355: 2350: 2336: 2335: 2323: 2322:External links 2320: 2317: 2316: 2284: 2257: 2239: 2228: 2199: 2173: 2144: 2112: 2079: 2047: 2014: 1989: 1963: 1962: 1960: 1957: 1956: 1955: 1950: 1944: 1939: 1933: 1932: 1916: 1913: 1755: 1747:user interface 1732: 1729: 1678: 1656: 1653: 1629: 1624:stack overflow 1608: 1605: 1507: 1493: 1490: 1458: 1451:An example in 1448: 1445: 1440: 1437: 1387: 1384: 1305: 1292:floating point 1207: 1196: 1195: 1191: 1190: 1186: 1185: 1181: 1180: 1176: 1175: 1171: 1170: 1166: 1165: 1161: 1160: 1156: 1155: 1151: 1150: 1146: 1145: 1141: 1140: 1136: 1135: 1131: 1130: 1117: 1114: 952: 864: 854: 851: 849: 846: 822: 816:An example in 785: 779:An example in 733: 727:An example in 711:Infinite Loop 701: 672: 588: 578: 575: 529: 526: 514:Cyrix coma bug 485: 482: 474:undecidability 463:reference loop 451:data structure 419: 416: 410: 407: 394: 391: 366: 363: 358: 355: 310: 307: 222: 149: 139: 136: 111: 110: 108: 107: 100: 93: 85: 82: 81: 79: 78: 73: 68: 63: 58: 53: 47: 44: 43: 15: 9: 6: 4: 3: 2: 2380: 2369: 2368:Software bugs 2366: 2364: 2361: 2359: 2356: 2354: 2351: 2349: 2346: 2345: 2343: 2333: 2329: 2326: 2325: 2305: 2301: 2299: 2294: 2288: 2272: 2268: 2261: 2253: 2249: 2243: 2237: 2232: 2225: 2213: 2209: 2203: 2187: 2183: 2177: 2170: 2158: 2154: 2148: 2130: 2123: 2116: 2100: 2096: 2095: 2090: 2083: 2076: 2065: 2061: 2057: 2051: 2035: 2031: 2030: 2025: 2018: 2003: 1999: 1993: 1978: 1974: 1968: 1964: 1954: 1951: 1948: 1945: 1943: 1940: 1938: 1935: 1934: 1930: 1924: 1919: 1912: 1910: 1906: 1903: 1753: 1750: 1748: 1745: 1741: 1737: 1736:Alderson loop 1731:Alderson loop 1676: 1674: 1671:. Example in 1670: 1666: 1627: 1625: 1621: 1616: 1614: 1604: 1594: 1590: 1586: 1505: 1503: 1499: 1456: 1454: 1444: 1436: 1432: 1430: 1426: 1422: 1418: 1414: 1410: 1406: 1402: 1398: 1394: 1383: 1381: 1376: 1374: 1370: 1361:(x <= 1.0) 1303: 1301: 1296: 1293: 1205: 1203: 1193: 1192: 1188: 1187: 1183: 1182: 1178: 1177: 1173: 1172: 1168: 1167: 1163: 1162: 1158: 1157: 1153: 1152: 1148: 1147: 1143: 1142: 1138: 1137: 1133: 1132: 1129: 1127: 1122: 1121: 1113: 950: 948: 943: 862: 860: 820: 819: 783: 782: 731: 730: 725: 699: 698:batch files: 697: 670: 668: 663: 660: 658: 657: 586: 584: 574: 569:), and Rust ( 559:DO ... END DO 551: 545: 541: 535: 525: 523: 519: 515: 511: 507: 503: 499: 495: 491: 481: 479: 475: 470: 468: 464: 460: 456: 452: 447: 445: 437: 436:device driver 433: 429: 424: 415: 406: 404: 399: 390: 388: 382: 380: 376: 371: 362: 354: 352: 348: 344: 340: 336: 332: 328: 324: 320: 316: 315:infinite loop 306: 304: 300: 220: 217: 215: 211: 208:. . . by the 207: 203: 147: 145: 135: 133: 128: 126: 122: 121:infinite loop 118: 106: 101: 99: 94: 92: 87: 86: 84: 83: 77: 74: 72: 71:Infinite loop 69: 67: 64: 62: 59: 57: 54: 52: 51:Do while loop 49: 48: 46: 45: 42: 39: 38: 33: 26: 22: 2348:Control flow 2308:. Retrieved 2296: 2287: 2275:. Retrieved 2260: 2242: 2231: 2223: 2216:. Retrieved 2202: 2190:. Retrieved 2176: 2168: 2161:. Retrieved 2147: 2136:. Retrieved 2115: 2103:. Retrieved 2092: 2082: 2074: 2068:. Retrieved 2060:Flow Journal 2059: 2050: 2040:December 27, 2038:. Retrieved 2027: 2017: 2006:. Retrieved 1992: 1981:. Retrieved 1967: 1899: 1814:getUserInput 1751: 1735: 1734: 1661:while (true) 1658: 1617: 1610: 1577:unsigned int 1570: 1495: 1450: 1442: 1433: 1428: 1424: 1420: 1416: 1412: 1408: 1404: 1400: 1396: 1392: 1389: 1377: 1365:(x < 1.1) 1353: 1297: 1285: 1199: 1123: 1099: 944: 921: 859:Visual Basic 856: 815: 778: 726: 723: 693: 664: 661: 654: 648: 580: 571:loop { ... } 557:), Fortran ( 552: 540:control flow 537: 534:Control flow 498:task manager 487: 484:Interruption 471: 462: 448: 441: 412: 396: 383: 372: 368: 360: 314: 312: 302: 298: 297: 218: 213: 209: 205: 201: 200: 141: 129: 125:endless loop 124: 120: 114: 76:Control flow 70: 66:Foreach loop 2277:January 22, 2218:January 22, 2163:January 22, 2105:February 7, 2094:PC Magazine 1587:used. With 1496:An example 563:for { ... } 510:system call 508:command or 455:linked list 2342:Categories 2310:2006-05-21 2192:22 January 2138:2020-01-23 2070:2020-01-23 2008:2020-01-22 1983:2020-01-22 1959:References 1905:dialog box 1483:#loop code 1471:1000000000 1373:loop index 1128:processor: 1126:AMD Turion 1102:if (a = 5) 532:See also: 453:such as a 432:Windows XP 144:pseudocode 56:While loop 2363:Recursion 1947:Fork bomb 1744:debugging 1613:recursion 649:The form 565:), Ruby ( 502:Control-C 494:interrupt 398:Spinlocks 393:Spinlocks 375:idle loop 343:thrashing 335:Busy wait 204:were run 2304:Archived 2271:Archived 2252:Archived 2212:Archived 2186:Archived 2157:Archived 2129:Archived 2099:Archived 2064:Archived 2034:Archived 2002:Archived 1977:Archived 1915:See also 1585:compiler 1509:unsigned 1498:for loop 1020:"%d 954:#include 830:println! 651:for (;;) 590:#include 347:deadlock 196:how_many 178:how_many 172:how_many 151:how_many 138:Overview 61:For loop 1626:error: 1407:, then 1369:integer 875:integer 762:println 561:), Go ( 522:SIGKILL 476:of the 434:. "The 403:mutexes 309:Details 190:display 1796:printf 1749:code. 1740:jargon 1716:return 1593:memory 1300:Python 1257:" 1245:printf 1086:return 1068:" 1056:printf 1026:" 1014:printf 750:System 635:return 629:" 617:printf 490:SIGINT 349:, and 2132:(PDF) 2125:(PDF) 1902:modal 1883:break 1781:while 1704:-> 1701:$ foo 1680:while 1643:Test1 1634:Test1 1599:. If 1415:; if 1371:as a 1363:, or 1331:print 1316:while 1224:while 1209:float 993:while 940:x = 1 881:while 735:while 677:PRINT 667:BASIC 329:with 299:birds 275:birds 263:birds 245:birds 242:while 224:birds 210:FALSE 160:while 119:, an 2279:2020 2220:2020 2194:2020 2165:2020 2107:2024 2042:2019 1871:> 1787:true 1686:true 1640:Call 1486:done 1453:bash 1395:and 1194:... 1002:< 969:void 963:main 917:loop 887:< 824:loop 818:Rust 811:done 805:echo 741:true 729:Java 713:goto 709:echo 686:GOTO 611:(;;) 599:main 544:goto 506:kill 467:ring 459:tree 323:loop 303:fish 290:fish 278:fish 254:> 251:fish 233:fish 123:(or 1907:in 1874:100 1868:sum 1844:sum 1817:(); 1772:int 1760:sum 1757:int 1710:()) 1707:bar 1673:PHP 1667:or 1659:A " 1649:Sub 1646:End 1631:Sub 1615:. 1521:for 1512:int 1500:in 1469:seq 1467:$ ( 1460:for 1349:0.1 1313:0.1 1275:0.1 1236:1.1 1218:0.1 978:int 960:int 866:dim 787:for 756:out 696:DOS 608:for 596:int 585:): 573:). 457:or 444:bug 430:on 313:An 293:end 187:end 134:. 115:In 23:or 2344:: 2302:. 2295:. 2269:. 2250:. 2222:. 2167:. 2097:. 2091:. 2073:. 2058:. 2032:. 2026:. 2000:. 1975:. 1862:if 1847:+= 1820:if 1805:); 1695:if 1675:: 1637:() 1554:++ 1542:!= 1504:: 1480:do 1464:in 1455:: 1346:+= 1322:!= 1302:: 1272:+= 1266:); 1254:\n 1233:!= 1204:: 1077:++ 1071:); 1065:\n 1038:if 1035:); 1023:\n 1005:10 949:: 878:do 872:as 861:: 839:); 802:do 796:)) 793:;; 790:(( 771:); 689:10 683:20 674:10 669:: 632:); 626:\n 602:() 550:. 480:. 426:A 405:. 353:. 345:, 260:do 216:. 169:do 166:() 146:: 2334:. 2313:. 2281:. 2196:. 2141:. 2109:. 2044:. 2011:. 1986:. 1895:} 1892:} 1886:; 1880:{ 1877:) 1865:( 1859:} 1853:; 1850:i 1838:{ 1835:) 1832:0 1829:* 1826:i 1823:( 1811:= 1808:i 1799:( 1793:{ 1790:) 1784:( 1778:; 1775:i 1769:; 1766:0 1763:= 1725:} 1722:} 1719:; 1713:{ 1698:( 1692:{ 1689:) 1683:( 1601:i 1597:i 1581:i 1573:i 1566:} 1560:{ 1557:) 1551:i 1548:; 1545:0 1539:i 1536:; 1533:1 1530:= 1527:i 1524:( 1518:; 1515:i 1502:C 1477:; 1474:) 1462:x 1429:B 1425:A 1421:A 1417:B 1413:B 1409:A 1405:B 1401:A 1397:B 1393:A 1391:( 1357:x 1343:x 1340:) 1337:x 1334:( 1328:: 1325:1 1319:x 1310:= 1307:x 1281:} 1278:; 1269:x 1263:x 1260:, 1248:( 1242:{ 1239:) 1230:x 1227:( 1221:; 1215:= 1212:x 1202:C 1110:a 1106:a 1095:} 1092:; 1089:0 1083:} 1080:; 1074:a 1059:( 1053:) 1050:5 1047:= 1044:a 1041:( 1032:a 1029:, 1017:( 1011:{ 1008:) 999:a 996:( 990:; 987:0 984:= 981:a 975:{ 972:) 966:( 947:C 936:x 932:x 928:x 924:x 914:1 911:+ 908:x 905:= 902:x 899:1 896:= 893:x 890:5 884:x 869:x 842:} 833:( 827:{ 799:; 774:} 765:( 759:. 753:. 747:{ 744:) 738:( 719:A 716:: 706:A 703:: 644:} 641:; 638:0 620:( 605:{ 583:C 287:- 284:3 281:= 272:- 269:3 266:= 257:1 248:+ 239:2 236:= 230:1 227:= 184:1 181:+ 175:= 157:0 154:= 104:e 97:t 90:v 34:. 27:.

Index

Infinite Loop (street)
Infinite Loop (book)
Endless Loop (album)
Loop constructs
Do while loop
While loop
For loop
Foreach loop
Infinite loop
Control flow
v
t
e
computer programming
halting problem
pseudocode
computer program
loop
operating systems
cooperative multitasking
Busy wait
hanging or freezing
thrashing
deadlock
access violations
idle loop
Apollo Guidance Computer
blue screen of death
Spinlocks
mutexes

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.