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 60
(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== 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'' (ALGOL 68 parlance for input/output) facilities. ALGOL 60 provided two [[evaluation strategy|evaluation strategies]] for [[Parameter (computer science)|parameter]] passing: the common [[call-by-value]], and [[call-by-name]]. The procedure declaration specified, for each formal parameter, which was to be used: ''value'' specified for call-by-value, and omitted for 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. |author1-link=Alfred V. Aho |last2=Sethi |first2=Ravi |author2-link=Ravi Sethi |last3=Ullman |first3=Jeffrey D. |author3-link=Jeffrey Ullman |year=1986 |title=Compilers: Principles, Techniques, and Tools |edition=1st |publisher=Addison-Wesley |isbn=978-0-201-10194-2 |title-link=Dragon Book (computer science)}}, 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's reevaluated. Say i := 1 and A[i] := 2, so every time swap is referenced it'll 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 (delayed computation)|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. === Language levels === The ALGOL 60 reports recognize three different levels of language, i.e., a Reference Language, a Publication Language, and several Hardware Representations. The Reference and Publication languages have no reserved words, however the reports do recommend<ref>{{Harvnb|Naur et al.|1963|loc=3.2.4. Standard functions}} </ref> reserving some identifiers for standard functions. The reports briefly describe hardware representations. Implementations differ in their hardware representations of underlined independent basic symbols<ref>{{Harvnb |Naur et al. |1963 |loc=2.1. Letters}}: (1) It should be particularly noted that throughout the reference language underlining [here this looks like underlined; N.L.] is used for defining independent basic symbols (see sections 2.2.2 and 2.3). These are understood to have no relation to the individual letters of which they are composed. Within the present report underlining will be used for no other purposes. </ref> # Reserved words # [[Stropping (syntax)|Stropping]] ===ALGOL 60 Reserved words and restricted identifiers=== There are 24 reserved words in the Modified Report: {{div col|colwidth=7em}} *<code>ARRAY</code> *<code>BEGIN</code> *<code>BOOLEAN</code> *<code>COMMENT</code> *<code>DO</code> *<code>ELSE</code> *<code>END</code> *<code>FALSE</code> *<code>FOR</code> *<code>GOTO</code> *<code>IF</code> *<code>INTEGER</code> *<code>LABEL</code> *<code>OWN</code> *<code>PROCEDURE</code> *<code>REAL</code> *<code>STEP</code> *<code>STRING</code> *<code>SWITCH</code> *<code>THEN</code> *<code>TRUE</code> *<code>UNTIL</code> *<code>VALUE</code> *<code>WHILE</code> {{div col end}}There are 35 such reserved words in the standard [[Burroughs Large Systems]] sub-language: {{div col|colwidth=7em}} *<code>ALPHA</code> *<code>ARRAY</code> *<code>BEGIN</code> *<code>BOOLEAN</code> *<code>COMMENT</code> *<code>CONTINUE</code> *<code>DIRECT</code> *<code>DO</code> *<code>DOUBLE</code> *<code>ELSE</code> *<code>END</code> *<code>EVENT</code> *<code>FALSE</code> *<code>FILE</code> *<code>FOR</code> *<code>FORMAT</code> *<code>GO</code> *<code>IF</code> *<code>INTEGER</code> *<code>LABEL</code> *<code>LIST</code> *<code>LONG</code> *<code>OWN</code> *<code>POINTER</code> *<code>PROCEDURE</code> *<code>REAL</code> *<code>STEP</code> *<code>SWITCH</code> *<code>TASK</code> *<code>THEN</code> *<code>TRUE</code> *<code>UNTIL</code> *<code>VALUE</code> *<code>WHILE</code> *<code>ZIP</code> {{div col end}} There are 71 such restricted identifiers in the standard Burroughs Large Systems sub-language: {{div col|colwidth=7em}} *<code>ACCEPT</code> *<code>AND</code> *<code>ATTACH</code> *<code>BY</code> *<code>CALL</code> *<code>CASE</code> *<code>CAUSE</code> *<code>CLOSE</code> *<code>DEALLOCATE</code> *<code>DEFINE</code> *<code>DETACH</code> *<code>DISABLE</code> *<code>DISPLAY</code> *<code>DIV</code> *<code>DUMP</code> *<code>ENABLE</code> *<code>EQL</code> *<code>EQV</code> *<code>EXCHANGE</code> *<code>EXTERNAL</code> *<code>FILL</code> *<code>FORWARD</code> *<code>GEQ</code> *<code>GTR</code> *<code>IMP</code> *<code>IN</code> *<code>INTERRUPT</code> *<code>IS</code> *<code>LB</code> *<code>LEQ</code> *<code>LIBERATE</code> *<code>LINE</code> *<code>LOCK</code> *<code>LSS</code> *<code>MERGE</code> *<code>MOD</code> *<code>MONITOR</code> *<code>MUX</code> *<code>NEQ</code> *<code>NO</code> *<code>NOT</code> *<code>ON</code> *<code>OPEN</code> *<code>OR</code> *<code>OUT</code> *<code>PICTURE</code> *<code>PROCESS</code> *<code>PROCURE</code> *<code>PROGRAMDUMP</code> *<code>RB</code> *<code>READ</code> *<code>RELEASE</code> *<code>REPLACE</code> *<code>RESET</code> *<code>RESIZE</code> *<code>REWIND</code> *<code>RUN</code> *<code>SCAN</code> *<code>SEEK</code> *<code>SET</code> *<code>SKIP</code> *<code>SORT</code> *<code>SPACE</code> *<code>SWAP</code> *<code>THRU</code> *<code>TIMES</code> *<code>TO</code> *<code>WAIT</code> *<code>WHEN</code> *<code>WITH</code> *<code>WRITE</code> {{div col end}} and also the names of all the intrinsic functions. ====Standard operators==== {| class="wikitable" ! colspan="2" |Priority ! Operator |- | rowspan="3" | first arithmetic || first || β (power) |- | second || Γ, / (real), Γ· (integer) |- | third || +, - |- | colspan="2"| second || <, β€, =, β₯, >, β |- | colspan="2"| third || Β¬ (not) |- | colspan="2" | fourth || β§ (and) |- | colspan="2" | fifth || β¨ (or) |- | colspan="2" | sixth || β (implication) |- | colspan="2" | seventh || β‘ (equivalence) |}
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)