Knowledge

Infinite loop

Source 📝

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

Index

Infinite loops
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

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