Knowledge

Statement (computer science)

Source đź“ť

1632:
Apart from assignments and subroutine calls, most languages start each statement with a special word (e.g. goto, if, while, etc.) as shown in the above examples. Various methods have been used to describe the form of statements in different languages; the more formal methods tend to be more precise:
1883:
In most programming languages, a statement can consist of little more than an expression, usually by following the expression with a statement terminator (semicolon). In such a case, while the expression evaluates to a value, the complete statement does not (the expression's value is discarded). For
1847:
Semantics is concerned with the meaning of a program. The standards documents for many programming languages use BNF or some equivalent to express the syntax/grammar in a fairly formal and precise way, but the semantics/meaning of the program is generally described using examples and English prose.
1867:
article describes several mathematical/logical formalisms which have been used to specify semantics in a precise way; these are generally more complicated than BNF, and no single approach is generally accepted as the way to go. Some approaches effectively define an interpreter for the language,
445:
Many compound statements are loop commands or choice commands. In theory only one of each of these types of commands is required. In practice there are various special cases which occur quite often; these may make a program easier to understand, may make programming easier, and can often be
1918:, where = is not an operator, but rather just a separator in the assignment statement. Although Python allows multiple assignments as each assignment were an expression, this is simply a special case of the assignment statement built into the language grammar rather than a true expression. 1892:(note the semicolon at the end) is a statement that will still set x to the value of y plus one because the expression within the statement is still evaluated, but the result of the expression is discarded, and the statement itself does not evaluate to any value. 1848:
This can result in ambiguity. In some language descriptions the meaning of compound statements is defined by the use of 'simpler' constructions, e.g. a while loop can be defined by a combination of tests, jumps, and
1824:
Certain names are reserved as part of the programming language and can not be used as programmer-defined names. The majority of the most popular programming languages use reserved keywords. Early examples include
2012:
Backus, J.W.; Bauer, F.L.; Green, J.; Katz, C.; McCarthy, J.; Naur, P.; Perlis, A.J.; Rutishauser, H.; Samuelson, K.; Vauquois, B.; Wegstein, J.H.; van Wijngaarden, A.; Woodger, M. Naur, Peter (ed.).
1985:
Backus, J.W.; Bauer, F.L.; Green, J.; Katz, C.; McCarthy, J.; Naur, P.; Perlis, A.J.; Rutishauser, H.; Samuelson, K.; Vauquois, B.; Wegstein, J.H.; van Wijngaarden, A.; Woodger, M. Naur, Peter (ed.).
332:
Compound statements may contain (sequences of) statements, nestable to any reasonable depth, and generally involve tests to decide whether or not to obey or repeat these contained statements.
1914:
Although the previous examples show assignment expressions, some languages do not implement assignment as an expression, but rather as a statement. A notable example of this is
111:
Simple statements are complete in themselves; these include assignments, subroutine calls, and a few statements which may significantly affect the program flow of control (e.g.
1833:(1959). Since 1970 other examples include Ada, C, C++, Java, and Pascal. The number of reserved words depends on the language: C has about 30 while COBOL has about 400. 405:
Other programming languages have a different special terminator on each kind of compound statement, so that one or more statements are automatically treated as a group:
119:, stop/halt). In some languages, input and output, assertions, and exits are handled by special statements, while other languages use calls to predefined subroutines. 1644:
Up until Fortran 77, the language was described in English prose with examples, From Fortran 90 onwards, the language was described using a variant of BNF.
1880:, which are evaluated. Expressions always evaluate to a value, which statements do not. However, expressions are often used as part of a larger statement. 1888:
is an expression that will set x to the value of y plus one, and the whole expression itself will evaluate to the same value that x is set to. However,
81:. A definition or declaration specifies the data on which a program is to operate, while a statement specifies the actions to be taken with that data. 1939: 2184: 2237: 2115: 50:
written in such a language is formed by a sequence of one or more statements. A statement may have internal components (e.g.
1868:
some use formal logic to reason about a program, some attach affixes to syntactic entities to ensure consistency, etc.
446:
implemented much more efficiently. There are many subtleties not mentioned here; see the linked articles for details.
78: 17: 202: 1679: 1627: 96: 39: 2201: 1915: 1659: 123: 74: 51: 1926:
Most languages have a fixed set of statements defined by the language, but there have been experiments with
1864: 1842: 100: 2089: 1783:
In Algol 60 and Algol 68, special tokens were distinguished explicitly: for publication, in boldface e.g.
70: 2145: 58: 2173: 1166: 1024: 358:
Some programming languages provide a general way of grouping statements together, so that any single
1749:
As spaces were optional up to Fortran 95, a typo could completely change the meaning of a statement:
1877: 1849: 66: 1810:
Tokens that are part of the language syntax thus do not conflict with programmer-defined names.
43: 2222: 1927: 1638: 31: 8: 2242: 1895:
Expressions can also be contained within other expressions. For instance, the expression
1778: 1675: 1548: 290: 1360: 264: 116: 47: 1964: 2064: 2039: 1683: 1651: 2231: 1819: 1671: 794: 2013: 1986: 1944: 1691: 1702:
Fortran and PL/1 do not have reserved keywords, allowing statements like:
95:
The appearance of a statement (and indeed a program) is determined by its
2114:
Jensen, Kathleen; Wirth, Niklaus (1974). Goos, G.; Hartmanis, J. (eds.).
1804: 1876:
A distinction is often made between statements, which are executed, and
1826: 654: 168: 450: 62: 1687: 1641:(BNF) which set a new level for language grammar specification. 907:
condition-controlled loop with test in the middle of the loop:
1940:
Comparison of programming languages (syntax) § Statements
1830: 1662:
have been proposed to allow direct indication of repetition.
1789:; for programming, with some special marking, e.g., a flag ( 99:
or grammar. The meaning of a statement is determined by its
229: 112: 344:
is any single statement (could be simple or compound).
2014:"Revised Report on the Algorithmic Language Algol 60" 1987:"Revised Report on the Algorithmic Language Algol 60" 1884:
instance, in C, C++, C#, and many similar languages,
1658:
BNF uses recursion to express repetition, so various
84:
Statements which cannot contain other statements are
2045:. United States of America Standards Institute. 1966 1930:
that allow the programmer to define new statements.
2223:PC ENCYCLOPEDIA: Definition of: program statement 27:A section of code that details a specific command 2229: 2011: 1984: 46:that expresses some action to be carried out. A 88:; those which can contain other statements are 1763:assignment of the value 1.5 to the variable 1697: 77:) make a distinction between statements and 2113: 1737:assignment to a subscripted variable named 1731:conditional statement (with other variants) 2090:"ASCII COBOL Programming Reference Manual" 1911:, which are also technically expressions. 1757:start of a loop with I running from 1 to 5 1665: 1647:Cobol used a two-dimensional metalanguage. 2146:"The Remaining Trouble Spots in Algol 60" 2005: 2082: 2057: 2032: 14: 2230: 2137: 1978: 1678:, and do not allow them to be used as 1039:<unconditional statement> ; 327: 2143: 2107: 338:Notation for the following examples: 1903:, which in turn contains the values 1813: 106: 1670:Some programming language grammars 24: 2053:– via WG5 Fortran Standards. 25: 2254: 2216: 2190:from the original on Feb 7, 2024. 2123:Lecture Notes in Computer Science 57:Many programming languages (e.g. 1921: 1772: 1181:<unconditional statement> 350:is any sequence of zero or more 187:C, C++, Java, PHP, Pascal, Ada: 2194: 2116:"PASCAL User Manual and Report" 1807:). This is called "stropping". 1482: 1417: 1367: 1269: 1228: 1190: 1099: 1070: 1044: 976: 911: 868: 830: 801: 733: 704: 678: 575: 516: 478: 409: 44:imperative programming language 2166: 1957: 1871: 1628:Syntax (programming languages) 13: 1: 2238:Programming language concepts 1950: 1843:Semantics (computer science) 1836: 657:with test at start of loop: 7: 2206:Python 3.10.8 documentation 1967:. webopedia. September 1996 1933: 1729:IF (A) X = 10... 362:can be replaced by a group: 10: 2259: 2070:. J3 Fortran. May 10, 2004 1840: 1817: 1776: 1625: 797:with test at end of loop: 387:begin <sequence> end 2144:Knuth, D. E. (Jul 1967). 2065:"Working draft J3/04-007" 1698:No distinguished keywords 1621: 795:condition-controlled loop 665:index := expression 655:condition-controlled loop 1899:contains the expression 1313: 1185:<statement> ; 1131: 762: 673:<statement> ; 616: 473:<statement> ; 79:definitions/declarations 2174:"ISO/IEC 9899:1999 (E)" 1666:Statements and keywords 1601:exception specification 1579:exception specification 1562:exception specification 153:C, C#, C++, PHP, Java: 140:Pascal, Algol 60, Ada: 2202:"7. Simple statements" 1682:. This often leads to 824:{ note reversed test } 1761:DO 10 I = 1.5 1755:DO 10 I = 1,5 1735:IF (A) = 2 1710:IF IF = THEN THEN ... 1361:case/switch statement 451:count-controlled loop 252:C, C++, PHP, Pascal: 221:relational expression 211:relational expression 1928:extensible languages 1793:), quotation marks ( 1686:which are easier to 393:{ <sequence> } 32:computer programming 2095:. unisys. June 2010 1676:mark them specially 1654:and equivalent BNF. 328:Compound statements 278:C, C++, Java, PHP: 236:GOTO numbered-label 1797:), or underlined ( 1779:Stropping (syntax) 1549:Exception handling 1363:multi-way choice: 1027:simple situation: 352:<statements> 1814:Reserved keywords 1690:, requiring less 1650:Pascal used both 1605:exception handler 1583:exception handler 1566:exception handler 378:<sequence> 360:<statement> 342:<statement> 107:Simple statements 18:Program statement 16:(Redirected from 2250: 2210: 2209: 2198: 2192: 2191: 2189: 2178: 2170: 2164: 2163: 2161: 2159: 2153:The ALGOL Family 2150: 2141: 2135: 2134: 2132: 2130: 2120: 2111: 2105: 2104: 2102: 2100: 2094: 2086: 2080: 2079: 2077: 2075: 2069: 2061: 2055: 2054: 2052: 2050: 2044: 2036: 2030: 2029: 2027: 2025: 2009: 2003: 2002: 2000: 1998: 1982: 1976: 1975: 1973: 1972: 1961: 1910: 1906: 1902: 1898: 1891: 1887: 1859: 1855: 1802: 1796: 1792: 1788: 1766: 1762: 1756: 1740: 1736: 1730: 1719: 1715: 1711: 1672:reserve keywords 1639:Backus–Naur form 1615: 1590: 1568: 1543: 1542: 1539: 1536: 1533: 1530: 1527: 1524: 1521: 1518: 1515: 1512: 1509: 1506: 1503: 1500: 1497: 1494: 1491: 1488: 1485: 1478: 1477: 1474: 1471: 1468: 1465: 1462: 1459: 1456: 1453: 1450: 1447: 1444: 1441: 1438: 1435: 1432: 1429: 1426: 1423: 1420: 1413: 1412: 1409: 1406: 1403: 1400: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1373: 1370: 1353: 1350: 1347: 1344: 1341: 1338: 1335: 1332: 1329: 1326: 1323: 1320: 1317: 1309: 1308: 1305: 1302: 1299: 1296: 1293: 1290: 1287: 1284: 1281: 1278: 1275: 1272: 1265: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1243: 1240: 1237: 1234: 1231: 1224: 1223: 1220: 1217: 1214: 1211: 1208: 1205: 1202: 1199: 1196: 1193: 1186: 1169:two-way choice: 1159: 1156: 1153: 1150: 1147: 1144: 1141: 1138: 1135: 1127: 1126: 1123: 1120: 1117: 1114: 1111: 1108: 1105: 1102: 1095: 1094: 1091: 1088: 1085: 1082: 1079: 1076: 1073: 1066: 1065: 1062: 1059: 1056: 1053: 1050: 1047: 1040: 1019: 1018: 1015: 1012: 1009: 1006: 1003: 1000: 997: 994: 991: 988: 985: 982: 979: 972: 971: 968: 965: 962: 959: 956: 953: 950: 947: 944: 941: 938: 935: 932: 929: 926: 923: 920: 917: 914: 902: 901: 898: 895: 892: 889: 886: 883: 880: 877: 874: 871: 864: 863: 860: 857: 854: 851: 848: 845: 842: 839: 836: 833: 826: 825: 822: 819: 816: 813: 810: 807: 804: 787: 784: 781: 778: 775: 772: 769: 766: 758: 757: 754: 751: 748: 745: 742: 739: 736: 729: 728: 725: 722: 719: 716: 713: 710: 707: 700: 699: 696: 693: 690: 687: 684: 681: 674: 647: 644: 641: 638: 635: 632: 629: 626: 623: 620: 612: 611: 608: 605: 602: 599: 596: 593: 590: 587: 584: 581: 578: 571: 570: 567: 564: 561: 558: 555: 552: 549: 546: 543: 540: 537: 534: 531: 528: 525: 522: 519: 512: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 481: 474: 461:index := 1 437: 436: 433: 430: 427: 424: 421: 418: 415: 412: 394: 388: 382: 361: 353: 349: 348:<sequence> 343: 321: 311: 301: 285: 275: 259: 249: 237: 224: 214: 197: 184: 163: 150: 137: 21: 2258: 2257: 2253: 2252: 2251: 2249: 2248: 2247: 2228: 2227: 2219: 2214: 2213: 2200: 2199: 2195: 2187: 2176: 2172: 2171: 2167: 2157: 2155: 2148: 2142: 2138: 2128: 2126: 2118: 2112: 2108: 2098: 2096: 2092: 2088: 2087: 2083: 2073: 2071: 2067: 2063: 2062: 2058: 2048: 2046: 2042: 2038: 2037: 2033: 2023: 2021: 2020:. Section "1.1" 2010: 2006: 1996: 1994: 1993:. Section "4.1" 1983: 1979: 1970: 1968: 1963: 1962: 1958: 1953: 1936: 1924: 1908: 1904: 1900: 1896: 1889: 1885: 1874: 1857: 1853: 1845: 1839: 1822: 1816: 1798: 1794: 1790: 1784: 1781: 1775: 1764: 1760: 1754: 1738: 1734: 1728: 1720:are variables). 1717: 1713: 1709: 1700: 1668: 1652:syntax diagrams 1630: 1624: 1594: 1572: 1555: 1540: 1537: 1534: 1531: 1528: 1525: 1522: 1519: 1516: 1513: 1510: 1507: 1504: 1501: 1498: 1495: 1492: 1489: 1486: 1483: 1475: 1472: 1469: 1466: 1463: 1460: 1457: 1454: 1451: 1448: 1445: 1442: 1439: 1436: 1433: 1430: 1427: 1424: 1421: 1418: 1410: 1407: 1404: 1401: 1398: 1395: 1392: 1389: 1386: 1383: 1380: 1377: 1374: 1371: 1368: 1355: 1354: 1351: 1348: 1345: 1342: 1339: 1336: 1333: 1330: 1327: 1324: 1321: 1318: 1315: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1279: 1276: 1273: 1270: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1221: 1218: 1215: 1212: 1209: 1206: 1203: 1200: 1197: 1194: 1191: 1173: 1161: 1160: 1157: 1154: 1151: 1148: 1145: 1142: 1139: 1136: 1133: 1124: 1121: 1118: 1115: 1112: 1109: 1106: 1103: 1100: 1092: 1089: 1086: 1083: 1080: 1077: 1074: 1071: 1063: 1060: 1057: 1054: 1051: 1048: 1045: 1031: 1016: 1013: 1010: 1007: 1004: 1001: 998: 995: 992: 989: 986: 983: 980: 977: 969: 966: 963: 960: 957: 954: 951: 948: 945: 942: 939: 936: 933: 930: 927: 924: 921: 918: 915: 912: 899: 896: 893: 890: 887: 884: 881: 878: 875: 872: 869: 861: 858: 855: 852: 849: 846: 843: 840: 837: 834: 831: 823: 820: 817: 814: 811: 808: 805: 802: 789: 788: 785: 782: 779: 776: 773: 770: 767: 764: 755: 752: 749: 746: 743: 740: 737: 734: 726: 723: 720: 717: 714: 711: 708: 705: 697: 694: 691: 688: 685: 682: 679: 661: 649: 648: 645: 642: 639: 636: 633: 630: 627: 624: 621: 618: 609: 606: 603: 600: 597: 594: 591: 588: 585: 582: 579: 576: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 538: 535: 532: 529: 526: 523: 520: 517: 509: 506: 503: 500: 497: 494: 491: 488: 485: 482: 479: 457: 434: 431: 428: 425: 422: 419: 416: 413: 410: 392: 386: 374: 359: 351: 347: 341: 330: 315: 305: 296: 279: 270: 253: 241: 235: 218: 208: 190:subroutine name 188: 177:subroutine name 174: 154: 141: 129: 109: 28: 23: 22: 15: 12: 11: 5: 2256: 2246: 2245: 2240: 2226: 2225: 2218: 2217:External links 2215: 2212: 2211: 2193: 2165: 2136: 2106: 2081: 2056: 2031: 2004: 1977: 1955: 1954: 1952: 1949: 1948: 1947: 1942: 1935: 1932: 1923: 1920: 1873: 1870: 1841:Main article: 1838: 1835: 1818:Main article: 1815: 1812: 1777:Main article: 1774: 1771: 1770: 1769: 1768: 1767: 1758: 1751: 1750: 1744: 1743: 1742: 1741: 1732: 1723: 1722: 1721: 1716:and the first 1699: 1696: 1667: 1664: 1656: 1655: 1648: 1645: 1642: 1637:Algol 60 used 1626:Main article: 1623: 1620: 1619: 1618: 1617: 1616: 1597:protected code 1591: 1575:protected code 1569: 1558:protected code 1546: 1545: 1544: 1479: 1414: 1358: 1357: 1356: 1314: 1310: 1266: 1225: 1187: 1164: 1163: 1162: 1132: 1128: 1096: 1067: 1041: 1022: 1021: 1020: 973: 905: 904: 903: 865: 827: 792: 791: 790: 763: 759: 730: 701: 675: 652: 651: 650: 617: 613: 572: 513: 475: 443: 442: 441: 440: 439: 438: 400: 399: 398: 397: 396: 395: 391:C, PHP, Java: 389: 383: 366: 365: 364: 363: 356: 355: 354: 345: 329: 326: 325: 324: 323: 322: 312: 302: 291:stop/halt/exit 288: 287: 286: 276: 262: 261: 260: 250: 238: 227: 226: 225: 215: 200: 199: 198: 185: 166: 165: 164: 151: 138: 108: 105: 26: 9: 6: 4: 3: 2: 2255: 2244: 2241: 2239: 2236: 2235: 2233: 2224: 2221: 2220: 2207: 2203: 2197: 2186: 2182: 2175: 2169: 2154: 2147: 2140: 2124: 2117: 2110: 2091: 2085: 2066: 2060: 2041: 2035: 2019: 2015: 2008: 1992: 1988: 1981: 1966: 1960: 1956: 1946: 1943: 1941: 1938: 1937: 1931: 1929: 1922:Extensibility 1919: 1917: 1912: 1893: 1881: 1879: 1869: 1866: 1861: 1851: 1844: 1834: 1832: 1828: 1821: 1820:Reserved word 1811: 1808: 1806: 1801: 1787: 1780: 1773:Flagged words 1759: 1753: 1752: 1748: 1747: 1746: 1745: 1733: 1727: 1726: 1724: 1708: 1707: 1705: 1704: 1703: 1695: 1693: 1689: 1685: 1681: 1677: 1673: 1663: 1661: 1653: 1649: 1646: 1643: 1640: 1636: 1635: 1634: 1629: 1614: 1610: 1609:no exceptions 1606: 1602: 1598: 1592: 1588: 1584: 1580: 1576: 1570: 1567: 1563: 1559: 1553: 1552: 1550: 1547: 1480: 1415: 1365: 1364: 1362: 1359: 1312:Fortran 77+: 1311: 1267: 1226: 1188: 1184: 1180: 1176: 1171: 1170: 1168: 1165: 1130:Fortran 77+: 1129: 1097: 1068: 1042: 1038: 1034: 1029: 1028: 1026: 1023: 974: 909: 908: 906: 866: 828: 799: 798: 796: 793: 760: 731: 702: 676: 672: 668: 664: 659: 658: 656: 653: 614: 573: 514: 476: 472: 468: 464: 460: 455: 454: 452: 449: 448: 447: 407: 406: 404: 403: 402: 401: 390: 384: 381: 377: 372: 371: 370: 369: 368: 367: 357: 346: 340: 339: 337: 336: 335: 334: 333: 319: 313: 309: 303: 300: 294: 293: 292: 289: 283: 277: 274: 268: 267: 266: 263: 257: 251: 247: 244: 239: 233: 232: 231: 228: 222: 216: 212: 207:C, C++, PHP: 206: 205: 204: 201: 195: 191: 186: 182: 178: 172: 171: 170: 167: 161: 157: 152: 148: 144: 139: 136: 132: 127: 126: 125: 122: 121: 120: 118: 114: 104: 102: 98: 93: 91: 87: 82: 80: 76: 72: 68: 64: 60: 55: 53: 49: 45: 41: 37: 33: 19: 2205: 2196: 2180: 2168: 2158:February 24, 2156:. Retrieved 2152: 2139: 2129:February 19, 2127:. Retrieved 2125:. Appendix D 2122: 2109: 2097:. Retrieved 2084: 2074:February 19, 2072:. Retrieved 2059: 2049:February 19, 2047:. Retrieved 2034: 2022:. Retrieved 2017: 2007: 1995:. Retrieved 1990: 1980: 1969:. Retrieved 1959: 1945:Control flow 1925: 1913: 1894: 1882: 1875: 1862: 1846: 1823: 1809: 1799: 1785: 1782: 1725:in Fortran: 1712:(the second 1701: 1669: 1657: 1631: 1612: 1608: 1604: 1600: 1596: 1586: 1585:} finally { 1582: 1578: 1574: 1565: 1561: 1560:except when 1557: 1182: 1178: 1174: 1167:if-statement 1036: 1032: 1025:if-statement 761:Fortran 90: 670: 666: 662: 470: 466: 462: 458: 444: 379: 375: 331: 317: 307: 298: 281: 272: 255: 245: 242: 220: 210: 193: 189: 180: 176: 159: 155: 146: 142: 134: 130: 110: 94: 89: 85: 83: 56: 35: 29: 2099:January 23, 2024:January 23, 1997:January 23, 1965:"statement" 1878:expressions 1872:Expressions 1829:(1953) and 1805:Elliott 503 1680:identifiers 1523:'q' 1502:'a' 1393:'q' 1378:'a' 615:Fortran 90: 52:expressions 42:unit of an 2243:Statements 2232:Categories 1971:2015-03-03 1951:References 1890:x = y + 1; 1827:FLOW-MATIC 1660:extensions 1172:Algol 60: 660:Algol 60: 456:Algol 60: 373:Algol 60: 308:expression 240:Algol 60: 194:parameters 181:parameters 160:expression 147:expression 135:expression 124:assignment 2040:"FORTRAN" 2018:mass:werk 1991:mass:werk 1897:x = y + 1 1886:x = y + 1 1865:semantics 1837:Semantics 1706:in PL/1: 1692:lookahead 1611:finally: 1577:} catch ( 1481:C, Java: 1257:statement 1245:statement 1227:C, Java: 1216:statement 1204:statement 1087:statement 1069:C, Java: 1058:statement 1030:Algol 60: 829:C, Java: 721:statement 703:C, Java: 692:statement 563:statement 515:C, Java: 504:statement 295:Fortran: 269:Fortran: 234:Fortran: 203:assertion 173:Fortran: 145: := 128:Fortran: 101:semantics 40:syntactic 36:statement 2185:Archived 1934:See also 1852:, using 1684:grammars 1593:Python: 1366:Pascal: 1346:sequence 1334:sequence 1295:sequence 1283:sequence 1189:Pascal: 1152:sequence 1113:sequence 1043:Pascal: 1005:sequence 984:sequence 949:sequence 922:sequence 876:sequence 841:sequence 809:sequence 800:Pascal: 780:sequence 765:DO WHILE 747:sequence 677:Pascal: 640:sequence 601:sequence 477:Pascal: 423:sequence 385:Pascal: 304:C, C++: 156:variable 143:variable 131:variable 90:compound 63:Algol 60 2181:ISO/IEC 1803:on the 1795:'begin' 1613:cleanup 1599:except 1587:cleanup 280:return 271:RETURN 219:assert 209:assert( 48:program 1916:Python 1850:labels 1791:'begin 1622:Syntax 1607:else: 1573:try { 1571:Java: 1564:=> 1556:begin 1484:switch 1352:END IF 1158:END IF 803:repeat 786:END DO 646:END DO 469:limit 318:number 299:number 265:return 217:Java: 117:return 97:syntax 86:simple 75:Pascal 2188:(PDF) 2177:(PDF) 2149:(PDF) 2119:(PDF) 2093:(PDF) 2068:(PDF) 2043:(PDF) 1901:y + 1 1831:COBOL 1800:begin 1786:begin 1765:DO10I 1688:parse 1595:try: 1554:Ada: 1535:break 1514:break 1508:alert 1461:=> 1458:' 1452:' 1443:alert 1440:=> 1437:' 1431:' 1416:Ada: 1384:alert 1268:Ada: 1177:test 1098:Ada: 1035:test 975:Ada: 958:while 940:break 867:Ada: 850:while 815:until 735:while 732:Ada: 706:while 680:while 669:test 667:while 634:limit 622:index 592:limit 580:index 574:Ada: 548:index 542:limit 539:<= 536:index 524:index 495:limit 483:index 467:until 408:Ada: 376:begin 316:exit 314:PHP: 306:exit( 297:STOP 282:value 273:value 256:label 254:goto 246:label 175:CALL 38:is a 2160:2021 2131:2021 2101:2021 2076:2021 2051:2021 2026:2021 1999:2021 1907:and 1863:The 1858:goto 1856:and 1718:THEN 1581:) { 1529:quit 1520:case 1499:case 1473:case 1464:quit 1449:when 1428:when 1419:case 1399:quit 1369:case 1349:> 1343:< 1340:ELSE 1337:> 1331:< 1328:THEN 1322:test 1298:> 1292:< 1289:else 1286:> 1280:< 1277:then 1274:test 1260:> 1254:< 1251:else 1248:> 1242:< 1236:test 1219:> 1213:< 1210:else 1207:> 1201:< 1198:then 1195:test 1183:else 1179:then 1155:> 1149:< 1146:THEN 1140:test 1116:> 1110:< 1107:then 1104:test 1090:> 1084:< 1078:test 1061:> 1055:< 1052:then 1049:test 1037:then 1014:loop 1008:> 1002:< 996:test 993:when 990:exit 987:> 981:< 978:loop 964:true 952:> 946:< 934:test 925:> 919:< 897:loop 888:test 885:when 882:exit 879:> 873:< 870:loop 856:test 844:> 838:< 818:test 812:> 806:< 783:> 777:< 771:test 756:loop 750:> 744:< 741:loop 738:test 724:> 718:< 712:test 695:> 689:< 683:test 643:> 637:< 610:loop 604:> 598:< 595:loop 566:> 560:< 507:> 501:< 463:step 426:> 420:< 417:then 414:test 243:goto 230:goto 169:call 113:goto 71:Java 34:, a 1674:or 1532:(); 1511:(); 1470:end 1467:(); 1446:(); 1408:end 1301:end 1119:end 1011:end 910:C: 894:end 753:end 663:for 619:DO 607:end 577:for 518:for 480:for 459:for 429:end 380:end 59:Ada 54:). 30:In 2234:: 2204:. 2183:. 2179:. 2151:. 2121:. 2016:. 1989:. 1860:. 1854:if 1739:IF 1714:IF 1694:. 1603:: 1551:: 1425:is 1402:() 1387:() 1375:of 1316:IF 1304:if 1271:if 1230:if 1192:if 1175:if 1134:IF 1122:if 1101:if 1072:if 1046:if 1033:if 928:if 913:do 832:do 686:do 671:do 586:1. 583:in 551:+= 498:do 492:to 486::= 471:do 465:1 453:: 432:if 411:if 213:); 196:); 158:= 133:= 115:, 103:. 92:. 73:, 69:, 65:, 61:, 2208:. 2162:. 2133:. 2103:. 2078:. 2028:. 2001:. 1974:. 1909:1 1905:y 1589:} 1541:} 1538:; 1526:: 1517:; 1505:: 1496:{ 1493:) 1490:c 1487:( 1476:; 1455:q 1434:a 1422:c 1411:; 1405:; 1396:: 1390:; 1381:: 1372:c 1325:) 1319:( 1307:; 1263:; 1239:) 1233:( 1222:; 1143:) 1137:( 1125:; 1093:; 1081:) 1075:( 1064:; 1017:; 999:; 970:; 967:) 961:( 955:} 943:; 937:) 931:( 916:{ 900:; 891:; 862:; 859:) 853:( 847:} 835:{ 821:; 774:) 768:( 727:; 715:) 709:( 698:; 631:, 628:1 625:= 589:. 569:; 557:) 554:1 545:; 533:; 530:1 527:= 521:( 510:; 489:1 435:; 320:; 310:) 284:; 258:; 248:; 223:; 192:( 183:) 179:( 162:; 149:; 67:C 20:)

Index

Program statement
computer programming
syntactic
imperative programming language
program
expressions
Ada
Algol 60
C
Java
Pascal
definitions/declarations
syntax
semantics
goto
return
assignment
call
assertion
goto
return
stop/halt/exit
count-controlled loop
condition-controlled loop
condition-controlled loop
if-statement
if-statement
case/switch statement
Exception handling
Syntax (programming languages)

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

↑