Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ALGOL
(section)
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!
==Properties== {{more citations needed section|date = February 2024}} ALGOL 60 as officially defined had no [[I/O]] facilities; implementations defined their own in ways that were rarely compatible with each other. In contrast, ALGOL 68 offered an extensive library of ''transput'' (input/output) facilities. ALGOL 60 allowed for two [[evaluation strategy|evaluation strategies]] for [[Parameter (computer science)|parameter]] passing: the common [[call-by-value]], and [[call-by-name]]. Call-by-name has certain effects in contrast to [[call-by-reference]]. For example, without specifying the parameters as ''value'' or ''reference'', it is impossible to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable.<ref>{{cite book |last1=Aho |first1=Alfred V. |author-link=Alfred V. Aho |last2=Sethi |first2=Ravi |author2-link=Ravi Sethi |last3=Ullman |first3=Jeffrey D. |author3-link=Jeffrey Ullman |title=[[Dragon Book (computer science)|Compilers: Principles, Techniques, and Tools]] |year=1986 |edition=1st |publisher=Addison-Wesley |isbn=0-201-10194-7}}, Section 7.5, and references therein</ref> Think of passing a pointer to swap(i, A[i]) in to a function. Now that every time swap is referenced, it is reevaluated. Say i := 1 and A[i] := 2, so every time swap is referenced it will return the other combination of the values ([1,2], [2,1], [1,2] and so on). A similar situation occurs with a random function passed as actual argument. Call-by-name is known by many compiler designers for the interesting "[[thunk]]s" that are used to implement it. [[Donald Knuth]] devised the "[[man or boy test]]" to separate compilers that correctly implemented "[[recursion (computer science)|recursion]] and non-local references." This test contains an example of call-by-name. ALGOL 68 was defined using a two-level grammar formalism invented by [[Adriaan van Wijngaarden]] and which bears his name. [[Van Wijngaarden grammar]]s use a [[context-free grammar]] to generate an infinite set of productions that will recognize a particular ALGOL 68 program; notably, they are able to express the kind of requirements that in many other programming language standards are labelled "semantics" and have to be expressed in ambiguity-prone natural language prose, and then implemented in compilers as ''ad hoc'' code attached to the formal language parser.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)