Block (programming): Difference between revisions

Content deleted Content added
m Reverted 1 edit by 45.174.190.251 (talk) to last revision by Jarble
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 2 templates: hyphenate params (5×);
Line 9:
==History==
Ideas of block structure were developed in the 1950s during the development of the first [[autocode]]s, and were formalized in the [[Algol 58]] and [[Algol 60]] reports. Algol 58 introduced the notion of the "compound statement", which was related solely to [[control flow]].<ref name="algol58_report">{{cite journal
|last1= Perlis |first1 = A. J. |authorlink1author-link1=Alan Perlis
|last2= Samelson |first2= K.
| date = 1958
Line 21:
| pages = 8–22
}}</ref> The subsequent ''Revised Report'' which described the syntax and semantics of Algol 60 introduced the notion of a block and [[block scope]], with a block consisting of " A sequence of declarations followed by a sequence of statements and enclosed between begin and end..." in which "[e]very declaration appears in a block in this way and is valid only for that block."<ref name="algol60_report">{{cite journal
| first1=J. W. |last1=Backus |authorlink1author-link1=John Backus
| first2=F. L. |last2=Bauer |authorlink2author-link2=Friedrich L. Bauer
| first3=J. |last3=Green
| first4=C. |last4=Katz
| first5=J. |last5=McCarthy
| first6=A. J. |last6=Perlis
| first7=H. |last7=Rutishauser |authorlink7author-link7=Heinz Rutishauser
| first8=K. |last8=Samelson
| first9=B. |last9=Vauquois
Line 44:
| pages = 299–314
| url = http://www.masswerk.at/algol60/report.htm
| accessdateaccess-date = 2009-10-27
}}</ref>