%%
%% RRA60.texinfo:                                       oct '90
%%
%% Erik Schoenfelder (schoenfr@ibr.cs.tu-bs.de)
%%
%%
%% This is a copy of the
%%
%%     ``Revised Report on the Algorithmic Language Algol 60''
%%
%% It is typed-in by me, but I am not the author.
%% It's not part of the NASE A60 interpreter - see the following note:
%%
%%
%% This note is taken from the end of the report:
%%
%%	Note.  This report is published in Numerische Mathematik, in
%%	the Communications of the ACM, and in the Journal of the
%%	British Computer Soc.  Reproduction of this report for any
%%	purpose is explicitly permitted; reference should be made
%%	to this issue of Numerische Mathematik and to the respective
%%	issues of the Communications and the Journal of the British
%%	Computer Soc. as the source.
%%
%%	Technical University Delft Delft, Holland W. L. van der
%%	Poel, (Chairman of Working Group 2.1 on Algol of the
%%	International Federation for Information Processing)
%%
%%
%% This is a LaTeX-Info Formatted file. Run it ether through ``latex''
%% for printable output or choose ``latex-info-format-buffer'' 
%% with the GNU Emacs for an online formatted info-file.
%%

\documentstyle[latexinfo]{article}

\scrollmode
\sloppy
\markright{Revised Report on the Algorithmic Language Algol 60}
\pagestyle{headings}

\c
\c page formatting; throw it away...
\c
\input{a4.sty}

\c
\c change the paragraph formatting a bit:
\c
\setlength{\parskip}{5pt plus 2pt minus 1pt}
\setlength{\parindent}{0pt}

\c
\c the keywords should be printed underlined
\c (may be in boldface). 
\c
\def\keyw#1{{\underline{\tt \bf \rawbackslash #1}\null}}

\c
\c \ten should produce the ``lowered-ten''; (i'd like to use \(_{10}\),
\c but it does not work).
\c \blank should produce the sign for the <blank>.
\c
\def\ten{{\tt\tiny\kern-.1667em\lower.5ex\hbox{10}\kern-.125em}}
\def\blank{{\hbox{\rule[-.2ex]{.1ex}{.3ex}\rule[-.2ex]{.8ex}{.1ex}\rule[-.2ex]{.1ex}{.3ex}\,}}}
\c *** specials for special language:
\c *** the French c should be \c{c}; but this is still a comment ...
\def\ue{\"u{}}
\def\oe{\"o{}}
\def\mfc{c}
\c *** math operators:
\def\mpow{\(\uparrow\)}
\def\mtim{\(\times\)}
\def\mdiv{\(\div\)}
\c *** relational operators:
\def\mlt{\(<\)}
\def\mle{\(\leq\)}
\def\meq{\(=\)}
\def\mge{\(\geq\)}
\def\mgt{\(>\)}
\def\mne{\(\not=\)}
\c *** logical operators:
\def\mleqv{\(\equiv\)}
\def\mlimp{\(\supset\)}
\def\mlor{\(\lor\)}
\def\mland{\(\land\)}
\def\mlnot{\(\lnot\)}

\c
\c here we go:
\c

\begin{document}

\c Anything before the `<rak>setfilename' will not appear in the Info file.
\setfilename{RRA60.info}

\node Top, Introduction, (dir), (dir)

\section*{ Revised Report on the Algorithmic Language Algol 60 }


\begin{center}
                                 By\\
                                   
       J.W. Backus, F.L. Bauer, J.Green, C. Katz, J. McCarthy\\
   P. Naur, A.J. Perlis, H. Rutishauser, K. Samuelson, B. Vauquois\\
            J.H. Wegstein, A. van Wijngaarden, M. Woodger
                                   
                             Edited by\\
                                   
                              Peter Naur
                                   
                                   
             Dedicated to the memory of William Turanski

\end{center}


\begin{menu}
* Introduction::	Introduction
* Description::		Description of the reference language
* Editors note::	Note by the Editor
\end{menu}

\subsection*{ Summary }


The report gives a complete defining description of the international
algorithmic language Algol 60. This is a language suitable for
expressing a large class of numerical processes in a form sufficiently
concise for direct automatic translation into the language of
programmed automatic computers.

The introduction contains an account of the preparatory work leading
up to the final conference, where the language was defined. In
addition the notions reference language, publication language, and
hardware representations are explained.

In the first chapter a survey of the basic constituents and features
of the language is given, and the formal notation, by which the
syntactic structure is defined, is explained.

The second chapter lists all the basic symbols, and the syntactic
units known as identifiers, numbers, and strings are defined. Further
some important notions such as quantity and value are defined.

The third chapter explains the rules for forming expressions and the
meaning of these expressions. Three different types of expressions
exist: arithmetic, Boolean (logical), and designational.

The fourth chapter describes the operational units of the language,
known as statements. The basic statements are: assignment statements
(evaluation of a formula), go to statements (explicit break of the
sequence of execution of statements), dummy statements, and procedure
statements (call for execution of a closed process, defined by a
procedure declaration). The formation of more complex structures,
having statement character, is explained. These include: conditional
statements, for statements, compound statements, and blocks.

In the fifth chapter the units known as declarations, serving for
defining permanent properties of the units entering into a process
described in the language, are defined.

The report ends with two detailed examples of the use of the language
and an alphabetic index of definitions.



\node Introduction, Description, Top, Top

\section*{ Introduction }



\subsection*{ Background }


After the publication (1)(2) of a preliminary report on the
algorithmic language Algol, as prepares at the conference in Zuerich
in 1958, much interest in the Algol language developed.

(1) Preliminary report - International Algebraic Language, Comm. 
    Assoc. Comp. Mach. 1, No. 12 (1958), 8.

(2) Report on the Algorithmic Language Algol by the ACM Committee
    on Programming Languages and the GAMM Committee on Programming,
    edited by A. J. Perlis and K. Samuelson, Numerische Mathematik
    Bd. 1, S. 41-60 (1959).


As a result of an informal meeting held at Mainz in November 1958, about
forty interested persons from several European countries held an Algol
implementation conference in Copenhagen in February 1959.  A ``hardware
group'' was formed for working cooperatively right down to the level of
the paper tape code.  This conference also led to the publication by
Regnecentralen, Copenhagen, of an `Algol Bulletin', edited by Peter
Naur, which served as a forum for further discussion.  During the June
1959 ICIP Conference in Paris several meetings, both formal and informal
ones, were held.  These meetings revealed some misunderstandings as to
the intent of the group which was primarily responsible for the
formulation of the language, but at the same time made it clear that
there exists a wide appreciation of the effort involved.  As a result of
the discussions it was decided to hold an international meeting in
January 1959 for improving the Algol language and preparing a final
report.  At a European Algol Conference in Paris in November 1959 which
was attended by about fifty people, seven European representatives were
selected at attend the January 1960 Conference, and they represent the
following organisations: Association Fran\mfc{}aise de Calcul, British
Computer Society, Gesellschaft f\ue{}r Angewandte Mathematik und
Mechanik, and the Nederlands Rekenmachine Genootschap.  The seven
representatives held a final preparatory meeting at Mainz in December
1959.

Meanwhile, in the United States, anyone who wished to suggest changes or
corrections to Algol was requested to send his comments to the
`Communications of the ACM', where they were published.  These comments
then became the basis of consideration for changes in the Algol
language.  Both the SHARE and USE organisations established Algol
working groups, and both organisations were represented on the ACM
Committee on Programming Languages.  The ACM Committee met in Washington
in November 1959 and considered all comments on Algol that had been sent
to the ACM `Communications'.  Also, seven representatives were selected
to attend the January 1960 international conference.  The seven
representatives held a final preparatory meeting in Boston in December
1959. 



\subsection*{ January 1960 Conference }


The thirteen representatives (1), from Denmark, England, France,
Germany, Holland, Switzerland, and the United States, conferred in
Paris from January 11 to 16, 1960.

(1) William Turanski of the American group was killed by an automobile
    just prior to the January 1960 Conference. 

Prior to this meeting a completely new draft report was worked out from
the preliminary report and the recommendations of the preparatory
meetings by Peter Naur and the Conference adopted this new form as the
basis for its report. The Conference then proceeded to work for
agreement on each item of the report. The present report represents the
union of the Committee's concepts and the intersection of its agreements.



\section*{ April 1962 Conference [Edited by M. Woodger] }



A meeting of some of the authors of Algol 60 was held on 2nd - 3rd April
in Rome, Italy, through the facilities and courtesy of the International
Computation Centre.  The following were present:

\begin{example}
Authors             Advisers            Observer

F. L. Bauer         M. Paul             W. L. van der Poel
J. Green            R. Franciotti       (Chairman, IFIP TC 2.1
C. Katz             P. Z. Ingerman      Working Group Algol)
R. Kogon (representing
        J.W. Backus)
P. Naur
K. Samuelson        G. Seegem\ue{}ller
J. H. Wegstein      R.E. Utman
A. van Wijngaarden
M. Woodger          P. Landin
\end{example}

The purpose of the meeting was to correct known errors in, attempt to
eliminate apparent ambiguities in, and otherwise clarify the Algol 60
Report.  Extensions to the language were not considered at the meeting. 
Various proposals for correction and clarification that were submitted
by interested parties in response to the Questionnaire in Algol Bulletin
No. 14 were used as a guide. 

This report constitutes a supplement to the Algol 60 Report which should
resolve a number of difficulties therein.  Not all of the questions
raised concerning the original report could be resolved.  Rather than
risk of hastily drawn conclusions on a number of subtle points, which
might create new ambiguities, the committee decided to report only those
points which they unanimously felt could be stated in clear and
unambiguous fashion. 

Questions concerned with the following areas left for further consideration by
Working Group 2.1 of IFIP, in the expectation that current
work on advanced programming languages will lead to
better resolution:

\begin{enumerate}

\item Side effects of functions.

\item The call by name concept.

\item \keyw{own}: static or dynamic.

\item For statement: static or dynamic.

\item Conflict between specification and declaration.

\end{enumerate}

The authors of the Algol 60 Report present at the Rome Conference,
being aware of the formation of a Working Group on Algol by IFIP,
accepted that any collective responsibility which they might have with respect to the development, specification, and refinement of the Algol language
will from now on be transferred to that body.

This report has been reviewed by IFIP TC 2 on Programming Languages in August 1962 and
has been approved by the Council of the International Federation for
Information Processing.

As with the preliminary Algol report, three different levels of language
are recognized, namely a Reference Language, a Publication Language, and
several Hardware Representations. 


Reference Language

\begin{enumerate}

\item It is the working language of the committee.

\item It is the defining language.

\item The characters are determined by ease of mutual understanding and
      not by any computer limitations, coders notation, or pure
      mathematical notation.

\item It is the basic reference and guide for compiler builders.

\item It is the guide for all hardware representations.

\item It is the guide for transliterating from publication language to
      any locally appropriate hardware representations.

\item The main publications of the Algol language itself will use the
      reference representation.
\end{enumerate}


Publication Language

\begin{enumerate}
\item The publication language admits variations of the reference
      language according to usage of printing and handwriting (e.g.
      subscripts, spaces, exponents, Greek letters).

\item It is used for stating and communicating process.

\item The characters used may be different in different countries, but
      univocal correspondence with reference representation must be
      secured.
\end{enumerate}


Hardware Representations

\begin{enumerate}
\item Each of these is a condensation of the reference language enforced
      by the limited number of characters on the standard input
      equipment.

\item Each one of these uses the character set of a particular computer
      and is the language accepted by a translator for that computer.

\item Each of these must by accompanied by a special set of rules for
      transliterating from publication or reference language.
\end{enumerate}

For transliteration between the reference language and a language
suitable for publications, among others, the following rules are
recommended.

\begin{example}

Reference Language              Publication Language


Subscript brackets [ ]          Lowering of the line between the
                                brackets and removal of the brackets.

Exponentiation \mpow{}                Raising the exponent.

Parentheses ()                  Any form of parentheses, brackets,
                                braces.

Basis of ten \ten{}                  Raising of the ten and of the following
                                integral number, inserting of the
                                intended multiplication sign.
\end{example}




\node Description, Structure, Introduction, Top

\section*{ Description of the reference language }



\begin{ifinfo}
                    Was sich ueberhaupt sagen laesst, laesst sich
                    klar sagen; und wovon man nicht reden
                    kann, darueber muss man schweigen.
                                        Ludwig Wittgenstein

\end{ifinfo}
\begin{iftex}
\hspace*{7cm} Was sich \"u{}berhaupt sagen l\"a{}\ss{}t, l\"a{}\ss{}t
sich\\
\hspace*{7cm} klar sagen; und wovon man nicht reden\\
\hspace*{7cm} kann, dar\"u{}ber mu\ss{} man schweigen.\\
\hspace*{9cm} \sc{Ludwig Wittgenstein}
\end{iftex}


\begin{menu}
* Structure::		1. Structure of the language
* Basic::		2. Basic symbols, identifiers, numbers, and strings
* Expressions::		3. Expressions
* Statements::		4. Statements
* Declarations::	5. Declarations
* Examples::		Examples of procedure declarations
* Index::		Alphabetic index of concepts and syntactic units
* Note::		Note
\end{menu}

\node Structure, Basic, Description, Description

\subsection*{ 1. Structure of the language }



As stated in the introduction, the algorithmic language has three
different kinds of representations -- reference, hardware, and
publication -- and the development described in the sequel is in terms
of the language are represented by a given set of symbols -- and it is
only in the choice of symbols that the other two representations may
differ. Structure and content must be the same for all
representations.

The purpose of the algorithmic language is to describe computational
processes. The basic concept used for the description of calculating
rules is the well known arithmetic expression containing as constituents
numbers, variables, and functions. From such expressions are compounded,
by applying rules of arithmetic composition, self-contained units of the
language -- explicit formulae -- called assignment statements.

To show the flow of computational processes, certain non-arithmetic
statements and statement clauses are added which may describe e.g.,
alternatives, or iterative repetitions of computing statements. Since it
is necessary for the function of the statements that one statement
refers to another, statements may be provided with labels. A sequence of
statements may be enclosed between the statement brackets \keyw{begin}
and \keyw{end} to form a compound statement.

Statements are supported by declarations which are not themselves
computing instructions, but inform the translator of the existence and
certain properties of objects appearing in statements, such as the class
of numbers taken on as values by a variable, the dimension of an array
of numbers, or even the set of rules defining a function. A sequence of
declarations followed by a sequence of statements and enclosed between
\keyw{begin} and \keyw{end} constitutes a block. Every declaration
appears in a block in this way and is valid only for that block.

A program is a block or compound statement which is not contained within
another statement and which makes no use of other statements not
contained within it.

In the sequel the syntax and semantics of the language will be
given (1).

(1) Whenever the precision of arithmetic is stated as being in general
    not specified, or the outcome of a certain process is left undefined
    or said to be undefined, this is to be interpreted in the sense that
    a program only fully defines a computational process if the
    accompanying information specifies the precision assumed, the kind
    of arithmetic assumed, and the course of action to be taken in all
    such cases as may occur during the execution of the computation.



\subsubsection*{ 1.1 Formalism for syntactic description. }


The syntax will be described with the aid of metalinguistic formulae
(1).

(1) Cf. J. W. Backus, The syntax and semantics of the proposed
    international algebraic language of the Zuerich ACM-GRAMM
    conference. ICIP Paris, June 1959.

Their interpretation is best explained by an example:

    \var{<ab>} ::= ( | [ | \var{<ab>} ( | \var{<ab>} \var{<d>}

Sequences of characters enclosed in the bracket \var{<>} represent
metalinguistic variables whose values are sequences of symbols. The
marks ::= and | (the latter with the meaning of \b{or}) are
metalinguistic connectives. Any mark in a formula, which is not a
variable or a connective, denotes itself (or the class of marks which
are similar to it). Juxta position of marks and/or variables in a
formula signifies juxtaposition of the sequences denoted. Thus the
formula above gives a recursive rule for the formation of values of the
variable \var{<ab>}. It indicates that \var{<ab>} may have the value (
or [ or that given some legitimate value of \var{<ab>}, another may be
formed by following it with the character ( or by following it with some
value of the variable \var{<d>}. If the values of \var{<d>} are the
decimal digits, some values of \var{<ab>} are:

\begin{example}
[(((1(37(
(12345(
(((
[86
\end{example}

In order to facilitate the study, the symbols used for
distinguishing the metalinguistic variables (i.e. the sequence of
characters appearing within the brackets \var{<>} as \var{ab} in the
above example) have been chosen to be words describing approximately
the nature of the corresponding variable. Where words which have
appeared in this manner are used elsewhere in the text they will refer
to the corresponding syntactic definition. In addition some formulae
have been given in more than one place.\refill

    Definition:

\var{<empty>} ::=

(i.e. the null string of symbols).



\node Basic, Expressions, Structure, Description

\subsection*{ 2. Basic symbols, identifiers, numbers, and strings. }

\subsection*{  Basic concepts }



The reference language is built up from the following basic symbols:

\var{<basic symbol>} ::= \var{<letter>} | \var{<digit>} |
         \var{<logical value>} | \var{<delimiter>}\refill



\subsubsection*{ 2.1. Letters }



\var{<letter>} ::= a | b | c | d | e | f | g | h | i | j | k | l |
        m | n | o | p | q | r | s | t | u | v | w | x | y | z | A |
        B | C | D | E | F | G | H | I | J | K | L | M | N | O | P |
        Q | R | S | T | U | V | W | X | Y | Z \refill


This alphabet may be arbitrarily restricted, or extended with any other
distinctive character (i.e. character not coinciding with any digit,
logical value or delimiter).

Letters do not have individual meaning. They are used for forming
identifiers and strings (1) (cf. sections 2.4. Identifiers, 2.6.
Strings).


(1) It should be particularly noted that throughout the reference
    language underlining [here this looks like \keyw{underlined} -
    (schoenfr)] 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.



2.2.1 Digits.


\var{<digit>} ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 \refill

Digits are used for forming numbers, identifiers, and strings.



2.2.2 Logical values.


\var{<logical value>} ::= \keyw{true} | \keyw{false}

The logical values have a fixed obvious meaning.



\subsubsection*{ 2.3. Delimiters }



\var{<delimiter>} ::= \var{<operator>} | \var{<separator>} | \var{<bracket>} |
        \var{<declarator>} | \var{<specificator>}\refill

\var{<operator>} ::= \var{<arithmetic operator>} | \var{<relational operator>} |
        \var{<logical operator>} | \var{<sequential operator>}\refill

\var{<arithmetic operator>} ::= + | - | \mtim{} | / | \mdiv{} | \mpow{} \refill

\var{<relational operator>} ::= \mlt{} | \mle{} | \meq{} | \mge{} | \mgt{} | \mne{} \refill

\var{<logical operator>} ::= \mleqv{} | \mlimp{} | \mlor{} | \mland{} | \mlnot{} \refill

\var{<sequential operator>} ::= \keyw{goto} | \keyw{if} | \keyw{then} |
        \keyw{else} | \keyw{for} | \keyw{do} (2)\refill

\var{<separator>} ::= , | . | \ten{} | : | ; | := | \blank{} | \keyw{step} |
        \keyw{until} | \keyw{while} | \keyw{comment}\refill

\var{<bracket>} ::= ( | ) | [ | ] | ` | ' | \keyw{begin} | \keyw{end}\refill

\var{<declarator>} ::= \keyw{own} | \keyw{Boolean} | \keyw{integer} |
        \keyw{real} | \keyw{array} | \keyw{switch} |
        \keyw{procedure}\refill

\var{<specificator>} ::= \keyw{string} | \keyw{label} |
        \keyw{value}\refill

(2) \keyw{do} is used in for statements. It has no relation to the
    \i{do} of the preliminary report, which is not included in
    Algol60.\refill


Delimiters have a fixed meaning which for the most part is obvious or
else will be given at the appropriate place in the sequel.

Typographical features such as blank space or change to a new line
have no significance in the reference language. They, however, be used
freely for facilitating reading.

For the purpose of including text among the symbols of a program the
following "comment" conventions hold:

The sequence of basic symbols:          is equivalent to

\begin{example}
; \keyw{comment} <any sequence not containing ;>;            ;
\keyw{begin} \keyw{comment} <any sequence not containing ;>;      \keyw{begin}
\keyw{end} <any sequence not containing \keyw{end} or ; or \keyw{else}>     \keyw{end}
\end{example}


By equivalence is here meant that any of the three structures shown in
the left hand column may be replaced, in any occurrence outside of
strings, by the symbol shown in the same line in the right hand
column without any effect on the action of the program. It is further
understood that the comment structure encountered first in the text
when reading from left to right has precedence in being replaced over
later structures contained in the sequence.



\subsubsection*{ 2.4. Identifiers }



2.4.1. Syntax.


\var{<identifier>} ::= \var{letter>} | \var{<identifier>}
        \var{<letter>} | \var{<identifier>} \var{<digit>}\refill



2.4.2. Examples.

\begin{example}
q
Soup
V17a
a34kTMNs
MARILYN
\end{example}


2.4.3. Semantics. Identifiers have no inherent meaning, but serve for
the identification of simple variables, arrays, labels, switches, and
procedures. They may be chosen freely (cf. however section 3.2.4.
Standard functions).

The same identifiers cannot be used to denote two different quantities
except when these quantities have disjoint scopes as defined by the
declarations of the program (cf section 2.7. Quantities, kinds and
scopes and section 5. Declarations).



\subsubsection*{ 2.5. Numbers }



2.5.1 Syntax.

\var{<unsigned integer>} ::= \var{<digit>} | \var{<unsigned integer>}
         \var{<digit>}

\var{<integer>} ::= \var{<unsigned integer>} | + \var{<unsigned integer>} |
        - \var{<unsigned integer>}

\var{<decimal fraction>} ::= . \var{<unsigned integer>}

\var{<exponential part>} ::= \ten{} \var{<integer>}

\var{<decimal number>} ::= \var{<unsigned integer>} | \var{<decimal fraction>} | 
        \var{<unsigned integer>} \var{<decimal fraction>}

\var{<unsigned number>} ::= \var{<decimal number>} | \var{<exponential part>} |
        \var{<decimal number>} \var{<exponential part>}

\var{<number>} ::= \var{<unsigned number>} | + \var{<unsigned number>} |
        - \var{<unsigned number>}


2.5.2. Examples.

\begin{example}
  0               -200.084                -.083\ten{}-02
177               + 07.43\ten{}8                -\ten{}7
   .5384             9.34\ten{}+10               \ten{}-4
 +0.7300             2\ten{}-4                  +\ten{}+5
\end{example}

2.5.3.  Semantics.  Decimal numbers have their conventional meaning. 
The exponent part is scale factor expressed as an integral power of 10. 


2.5.4. Types.  Integers are of the type \keyw{integer}. All other
numbers are of type \keyw{real} (cf. section 5.1 Type declarations).



\subsubsection*{ 2.6. Strings }


2.6.1. Syntax.

\var{<proper string>} ::=
        \var{<any sequence of symbols not containing ` or ' >} 
        | \var{<empty>}\refill

\var{<open string>} ::= \var{<proper string>} `\var{<open string>}' |
        \var{<open string>}\var{<open string>}\refill

\var{<string>} ::= `\var{<open string>}'


2.6.2. Examples.

\begin{example}
`5k,,-`[[[`\mland{}=/:'Tt''
`This\blank{}is\blank{}a\blank{}`string''
\end{example}

2.6.3.  Semantics.  In order to enable the language to handle arbitrary
sequences of basic symbols the string quotes ` and ' are introduced.
The Symbol \blank{} denotes a space. It has no significance outside strings.
Strings are used as actual parameters of procedures (cf. sections 3.2.
Function designators and 4.7. Procedure Statements).\refill



\subsubsection*{ 2.7. Quantities, kinds and scopes }



The following kinds of quantities are distinguished: simple variables,
arrays, labels, switches, and procedures. 

The scope of a quantity is the set of statements and expressions in
which the declaration of the identifier associated with that quantity is
valid.  For labels see section 4.1.3. 



\subsubsection*{ 2.8. Values and types }



A value is an ordered set of numbers (special case: a single number), an
ordered set of logical values (special case: a single logical value), or
a label. 

Certain of the syntactic units are said to possess values.  These values
will in general change during the execution of the program The values of
expressions and their constituents are defined in section 3.  The value
of an array identifier is the ordered set of values of the corresponding
array of subscripted variables (cf.  section 3.1.4.1). 

The various ``types'' (\keyw{integer}, \keyw{real}, \keyw{Boolean})
basically denote properties of values.  The types associated with
syntactic units refer to the values of these units. 



\node Expressions, Statements, Basic, Description

\subsection*{ 3. Expressions }



In the language the primary constituents of the programs describing
algorithmic processes are arithmetic, Boolean, and designational
expressions.  Constituents of the expressions, except for certain
delimiters, are logical values, numbers, variables, function designators,
and elementary arithmetic, relational, logical, and sequential
operators.  Since the syntactic definition of both variables and
function designators contains expressions, the definition of
expressions, and their constituents, is necessarily recursive.


\var{<expression>} ::= \var{<arithmetic expression>} |
        \var{<Boolean expression>} | \var{<designational expression>}



\subsubsection*{ 3.1. Variables }


3.1.1. Syntax

\var{<variable identifier>} ::= \var{<identifier>}

\var{<simple variable>} ::= \var{<variable identifier>}

\var{<subscript expression>} ::= \var{<arithmetic expression>}

\var{<subscript list>} ::= \var{<subscript expression>} |
        \var{<subscript list>} , \var{<subscript expression>}

\var{<array identifier>} ::= \var{<identifier>}

\var{<subscripted value>} ::= \var{<array identifier>}
        [ \var{<subscripted list>} ]

\var{<variable>} ::= \var{<simple variable>} | \var{<subscripted variable>}


3.1.2. Examples

\begin{example}
epsilon
detA
a17
Q[7,2]
x[sin(n\mtim{}pi/2),Q[3,n,4]]
\end{example}


3.1.3.  Semantics.  A variable is a designation given to a single value. 
This value may be used in expressions for forming other values and may
be changed at will by means of assignment statements (section 4.2).  The
type of the value of a particular variable is defined in the declaration
for the variable itself (cf.  section 5.1.  Type declarations) or for
the corresponding array identifier (cf. section 5.2. Array declarations),

3.1.4.  Subscripts.  3.1.4.1.  Subscripted variables designate values
which are components of multidimensional arrays (cf.  section 5.2. 
Array declarations).  Each arithmetic expression of the subscript list
occupies one subscript position of the subscripted variable and is
called a subscript.  The complete list of subscripts is enclosed in the
subscript brackets [ ].  The array component referred to by a
subscripted variable is specified by the actual numerical value of its
subscripts (cf.  section 3.3.  Arithmetic expressions). 

3.1.4.2.  Each subscript position acts like a variable of type
\keyw{integer} and the evaluation of the subscript is understood to be
equivalent to an assignment to this fictitious variable (cf.  section
4.2.4).  The value of the subscripted variable is defined only if the
value of the subscript expression is within the subscript bounds of the
array (cf.  section 5.2.  Array declarations). 



\subsubsection*{ 3.2. Function designators }


3.2.1. Syntax

\var{<procedure identifier>} ::= \var{<identifier>}

\var{<actual parameter>} ::= \var{<string>} | \var{<expression>} |
        \var{<array identifier>} | \var{<switch identifier>} |
        \var{<procedure identifier>}

\var{<letter string>} ::= \var{<letter>} | \var{<letter string>} \var{<letter>}

\var{<parameter delimiter>} ::= , | ) \var{<letter string>} : (

\var{<actual parameter list>} ::= \var{<actual parameter>} |
        \var{<actual parameter list>} \var{<parameter delimiter>}
        \var{<actual parameter>}

\var{<actual parameter part>} ::= \var{<empty>} |
        ( \var{<actual parameter list>} )

\var{<function designator>} ::= \var{<procedure identifier>}
        \var{<actual parameter part>}


3.2.2. Examples

\begin{example}
sin(a-b)
J(v+s,n)
R
S(s-5) Temperature: (T) Pressure: (P)
Compile (`:=') Stack: (Q)
\end{example}

3.2.3.  Semantics.  Function designators define single numerical or
logical values which result through the application of given sets of
rules defined by a procedure declaration (cf.  section 5.4.  Procedure
declarations) to fixed sets of actual parameters.  The rules governing
specification of actual parameters are given in section 4.7.  Procedure
statements.  Not every procedure declaration defines the value of a
function designator.

3.2.4.  Standard functions.  Certain identifiers should be reserved for
the standard functions of analysis, which will be expressed as
procedures.  It is recommended that this reserved list should contain:

\begin{description}

\item[abs (E)] for the modulus (absolute value) of the value of the
        expression E

\item[sign (E)] for the sign of the value of E (+1 for E\mgt{}0, 0 for E=0,
        -1 for E\mlt{}0)

\item[sqrt (E)] for the square root of the value of E

\item[sin (E)] for the sine of the value of E

\item[cos (E)] for the cosine of the value of E

\item[arctan (E)] for the principal value of the arctangent of the value
        of E

\item[ln (E)] for the natural logarithm of the value of E

\item[exp (E)] for the exponential function of the value
        of E (e \mpow{} E)
\end{description}

These functions are all understood to operate indifferently on arguments
both of type \keyw{real} and \keyw{integer}.  They will all yield values
of type \keyw{real}, except for sign (E) which will have values of type
\keyw{integer}.  In a particular representation these function may be
available without explicit declarations (cf.  section 5.  Declarations). 

3.2.5.  Transfer functions.  It is understood that transfer functions
between any pair of quantities and expressions my be defined.  Among the
standard functions it is recommended that there be one, namely

\begin{example}
    entier (E),
\end{example}

which ``transfers'' an expression of real type to one of integer type,
and assigns to it the value which is the largest integer not greater
than the value of E. 



\subsubsection*{ 3.3. Arithmetic expressions }


3.3.1. Syntax

\var{<adding operator>} ::= + | -

\var{<multiplying operator>} ::= \mtim{} | / | \mdiv{}

\var{<primary>} ::= \var{<unsigned number>} | \var{<variable>} |
        \var{<function designator>} | ( \var{<arithmetic expression>} )

\var{<factor>} ::= \var{<primary>} | \var{<factor>} |
        \var{<factor>} \mpow{} \var{<primary>}

\var{<term>} ::= \var{<factor>} | \var{<term>} \var{<multiplying operator>}
        \var{<factor>}

\var{<simple arithmetic expression>} ::= \var{<term>} | 
        \var{<adding operator>} \var{<term>} |
        \var{<simple arithmetic expression>} \var{<adding operator>}
        \var{<term>}

\var{<if clause>} ::= \keyw{if} \var{<Boolean expression>} \keyw{then}

\var{<arithmetic expression>} ::= \var{<simple arithmetic expression>} |
        \var{<if clause>} \var{<simple arithmetic expression>}
        \keyw{else} \var{<arithmetic expression>}


3.3.2. Examples.

Primaries:

\begin{example}
7.394\ten{}-8
sum
w[i+2,8]
cos(y+z\mtim{}3)
(a-3/y+vu\mpow{}8)
\end{example}

Factors:

\begin{example}
omega
sum\mpow{}cos(y+z\mtim{}3)
7.394\ten{}-8\mpow{}w[i+2,8]\mpow{}(a-3/y+vu\mpow{}8)
\end{example}

Terms:

\begin{example}
U
omega\mtim{}sum\mpow{}cos(y+z\mtim{}3)/7.394\ten{}-8\mpow{}w[i+2,8]\mpow{}(a-3/y+vu\mpow{}8)
\end{example}

Simple arithmetic expressions:

\begin{example}
U-Yu+omega\mtim{}sum\mpow{}cos(y+z\mtim{}3)/7.394\ten{}-8\mpow{}w[i+2,8]\mpow{}
        (a-3/y+vu\mpow{}8)
\end{example}

Arithmetic expressions:

\begin{example}
w\mtim{}u-Q(S+Cu)\mpow{}2
\keyw{if} q\mgt{}0 \keyw{then} S+3\mtim{}Q/A \keyw{else} 2\mtim{}S+3\mtim{}q
\keyw{if} a\mlt{}0 \keyw{then} U+V \keyw{else} \keyw{if} a\mtim{}b\mgt{}17 \keyw{then} U/V \keyw{else} \keyw{if} k\mne{}y \keyw{then}
        V/U \keyw{else} 0
a\mtim{}sin(omega\mtim{}t)
0.57\ten{}12\mtim{}a[N\mtim{}(N-1)/2,0]
(A\mtim{}arctan(y)+Z)\mpow{}(7+Q)
\keyw{if} q \keyw{then} n-1 \keyw{else} n
\keyw{if} a\mlt{}0 \keyw{then} A/B \keyw{else} \keyw{if} b=0 \keyw{then} B/A \keyw{else} z
\end{example}


3.3.3.  Semantics.  An arithmetic expression is a rule for computing a
numerical value.  In case of simple arithmetic expressions this value
is obtained by executing the indicated arithmetic operations on the
actual numerical values of the primaries of the expression, as explained
in detail in section 3.3.4 below.  The actual numerical value for a
primary is obvious in the case of numbers.  For variables it is the
current value (assigned last in the dynamic sense), and for function
designators it is the value arising from the computing rules defining
the procedure (cf.  section 5.4.4.  Values of function designators) when
applied to the current values of the procedure parameters given in the
expression.  Finally, for arithmetic expressions enclosed in parentheses
the value must through a recursive analysis be expressed in terms of the
values of primaries of the other three kinds.

In the more general arithmetic expression, which include if clauses, one
out of several simple arithmetic expressions is selected on the basis of
the actual values of the Boolean expression (cf.  section 3.4.  Boolean
expressions).  This selection is made as follows: The Boolean expressions
of the if clauses are evaluated one by one in the sequence from left to
right until one having the value \keyw{true} is found.  The value of the
arithmetic expression is then the value of the first arithmetic
expression following this Boolean (the largest arithmetic expression
found in this position is understood).  The construction:

\begin{example}
\keyw{else} \var{<simple arithmetic expression>}
\end{example}

is equivalent to the construction:

\begin{example}
\keyw{else} \keyw{if} \keyw{true} \keyw{then} \var{<simple arithmetic expression>}
\end{example}

3.3.4.  Operators and types.  Apart from the Boolean expressions of if
clauses, the constituents of simple arithmetic expressions must be of
types \keyw{real} or \keyw{integer} (cf.  section 5.1.  Type
declarations).  The meaning of the basic operators and the types of the
expressions to which they lead are given by the following rules:

3.3.4.1.  The operators +, -, and \mtim{} have the conventional meaning
(addition, subtraction, and multiplication).  The type of the expression
will by \keyw{integer} if both of the operands are of \keyw{integer}
type, otherwise \keyw{real}.

3.3.4.2.  The operations \var{<term>} / \var{<factor>} and \var{<term>}
\mdiv{} \var{<factor>} both denote division, to be understood as a
multiplication of the term by the reciprocal of the factor with due
regard to the rules of precedence (cf.  section 3.3.5).  Thus for
example \refill

\begin{example}
a/b\mtim{}7/(p-q)\mtim{}v/s
\end{example}\refill

means

\begin{example}
((((a\mtim{}(b\mpow{}-1))\mtim{}7)\mtim{}((p-q)\mpow{}-1))\mtim{}v)\mtim{}(s\mpow{}-1)
\end{example}

The operator / is defined for all four combinations of types \keyw{real}
and \keyw{integer} and will yield results of \keyw{real} type in any
case.  The operator \mdiv{} is defined only for two operands of type
\keyw{integer} and will yield a result of type \keyw{integer},
mathematically defined as follows: \refill

\begin{example}
a \mdiv{} b = sign(a/b) \mtim{} entier(abs(a/b))
\end{example}

(cf. sections 3.2.4 and 3.2.5).

3.3.4.3.  The operation \var{<factor>} \mpow{} \var{<factor>}
denotes exponentiation, where the factor is the base and the primary is
the exponent.  Thus for example \refill

\begin{example}
2 \mpow{} n \mpow{} k means (2^n)^k
\end{example}

while

\begin{example}
2 \mpow{} (n \mpow{} m)  means  2^(n^m)
\end{example}


Writing i for a number of \keyw{integer} type, r for a number of
\keyw{real} type, and a for a number of ether \keyw{integer} or
\keyw{real} type, the result is given by the following rules: \refill


\begin{example}
a \mpow{} i

    if i\mgt{}0:  a\mtim{}a\mtim{}...\mtim{}a (i times), of the same type as a.
    if i\meq{}0:  if a\mne{}0:  1, of the same type as a.
              if a\meq{}0:  undefined.
    if i\mlt{}0,  if a\mne{}0:  1/(a\mtim{}a\mtim{}a\mtim{}...\mtim{}a) (the denominator has
                        -i factors), of type \keyw{real}.
              if a\meq{}0:  undefined.

a \mpow{} r

    if a\mgt{}0:  exp(r\mtim{}ln(a)), of type \keyw{real}.
    if a\meq{}0,  if r\mgt{}0:  0.0, of type \keyw{real}.
              if r\mle{}0:  undefined.
    if a\mlt{}0:  always undefined.

\end{example}


3.3.5.  Precedence of operators.  The sequence of operations within one
expression is generally from left to right, with the following
additional rules:

3.3.5.1.  According to the syntax given in section 3.3.1 the following
rules of precedence hold:

first:    \mpow{}

second:   \mtim{} / \mdiv{}

third:    + -


3.3.5.2.  The expression between a left parenthesis and the matching
right parenthesis is evaluated by itself and this value is used in
subsequent calculations.  Censequently the desired order of execution of
operations within an expression can always be arranged by appropriate
positioning of parenthesis. \refill

3.3.6.  Arithmetics of \keyw{real} quantities.  Numbers and variables of
type \keyw{real} must be interpreted in the sense of numerical analysis,
i.e.  as entities defined inherently with only a finite accuracy.
Similarly, the possibility of the occurrence of a finite deviation from
the mathematically defined result in any arithmetic expression is
explicitly understood.  No exact arithmetic will be specified, however,
and it is indeed understood that different hardware representations may
evaluate arithmetic expressions differently.  The control of the
possible consequences of such differences must be carried out by the
methods of numerical analysis.  This control must be considered a part
of the process to be described, and will therefore be expressed in terms
of the language itself. \refill



\subsubsection*{ 3.4. Boolean expressions }


3.4.1. Syntax.

\var{<relational operator>} ::= \mlt{} | \mle{} | \meq{} | \mge{} | \mgt{} | \mne{}

\var{<relation>} ::= \var{<simple arithmetic expression>} 
        \var{<relational operator>} \var{<simple arithmetic expression>}

\var{<Boolean primary>} ::= \var{<logical value>} | \var{<variable>} |
        \var{<function designator>} | \var{<relation>} |
        ( \var{<Boolean expression>} )

\var{<Boolean secondary>} ::= \var{<Boolean primary>} |
        \mlnot{} \var{<Boolean primary>}

\var{<Boolean factor>} ::= \var{<Boolean secondary>} |
        \var{<Boolean factor>} \mland{} \var{<Boolean secondary>}

\var{<Boolean term>} ::= \var{<Boolean factor>} |
        \var{<Boolean term>} \mlor{} \var{<Boolean factor>}

\var{<implication>} ::= \var{<Boolean term>} |
        \var{<implication>} \mlimp{} \var{<Boolean term>}

\var{<simple Boolean>} ::= \var{<implication>} | \var{<simple Boolean>}
        \mleqv{} \var{<implication>}

\var{<Boolean expression>} ::= \var{<simple Boolean>} | \var{<if clause>}
        \var{<simple Boolean>} \keyw{else} \var{<Boolean expression>}

3.4.2. Examples.

\begin{example}
x=-2
Y\mgt{}V\mlor{}z\mlt{}q
a+b\mgt{}-5\mland{}z-d\mgt{}q\mpow{}2
p\mland{}q\mlor{}x\mne{}y 
g\mleqv{}\mlnot{}a\mland{}b\mland{}\mlnot{}c\mlor{}d\mlor{}e\mlimp{}\mlnot{} f
\keyw{if} k\mlt{}1 \keyw{then} s\mlt{}w \keyw{else} h \mle{} c
\keyw{if} \keyw{if} \keyw{if} a \keyw{then} b \keyw{else} c \keyw{then} d \keyw{else} f \keyw{then} g \keyw{else} h \mlt{} k
\end{example}

3.4.3.  Semantics.  A Boolean expression is a rule for computing a
logical value.  The principles of evaluation are entirely analogous to
those given for arithmetic expressions in section 3.3.3. 

3.4.4.  Types.  Variables and function designators entered as Boolean
primaries must be declared \keyw{Boolean} (cf.  section 5.1.  Type
declarations and section 5.4.4.  Value of function designators). 

3.4.5.  The operators.  Relations take on the value \keyw{true} whenever
the corresponding relation is satisfied for the expressions involved,
otherwise \keyw{false}. 

The meaning of the logical operators \mlnot{} (not), \mland{} (and),
\mlor{} (or), \mlimp{} (implies), and \mleqv{} (equivalent), is given
by the following function table. 


\begin{ifinfo}
\begin{example}
b1            | \keyw{false} | \keyw{false} | \keyw{true}  | \keyw{true}
b2            | \keyw{false} | \keyw{true}  | \keyw{false} | \keyw{true}
----------------------------------------------------------------
\mlnot{} b1      | \keyw{true}  | \keyw{true}  | \keyw{false} | \keyw{false}
b1 \mland{} b2   | \keyw{false} | \keyw{false} | \keyw{false} | \keyw{true}
b1 \mlor{} b2    | \keyw{false} | \keyw{true}  | \keyw{true}  | \keyw{true}
b1 \mlimp{} b2  | \keyw{true}  | \keyw{true}  | \keyw{false} | \keyw{true}
b1 \mleqv{} b2 | \keyw{true}  | \keyw{false} | \keyw{false} | \keyw{true}
\end{example}
\end{ifinfo}

\begin{iftex}
\begin{example}
b1       | \keyw{false} | \keyw{false} | \keyw{true} | \keyw{true}
b2       | \keyw{false} | \keyw{true} | \keyw{false} | \keyw{true}
----------------------------------------------------------------
\mlnot{} b1     | \keyw{true} | \keyw{true} | \keyw{false} | \keyw{false}
b1 \mland{} b2  | \keyw{false} | \keyw{false} | \keyw{false} | \keyw{true}
b1 \mlor{} b2  | \keyw{false} | \keyw{true} | \keyw{true} | \keyw{true}
b1 \mlimp{} b2  | \keyw{true} | \keyw{true} | \keyw{false} | \keyw{true}
b1 \mleqv{} b2  | \keyw{true} | \keyw{false} | \keyw{false} | \keyw{true}
\end{example}
\end{iftex}


3.4.6.  Precedence of operators.  The sequence of operations within one
expression is generally from left to right, with the following
additional rules:

3.4.6.1.  According to the syntax given in section 3.4.1 the following
rules of precedence hold:

first: arithmetic expressions according to section 3.3.5.

second: \mlt{} \mle{} \meq{} \mge{} \mgt{} \mne{}

third: \mlnot{}

fourth: \mland{}

fifth: \mlor{}

sixth: \mlimp{}

seventh: \mleqv{}


3.4.6.2.  The use of parentheses will be interpreted in the sense given
in section 3.3.5.2. 



\subsubsection*{ 3.5. Designational expressions }


3.5.1. Syntax.

\var{<label>} ::= \var{<identifier>} | \var{<unsigned integer>}

\var{<switch identifier>} ::= \var{<identifier>}

\var{<switch designator>} ::= \var{<switch identifier>}
        [\var{<subscript expression>}]

\var{<simple designational expression>} ::= \var{<label>} |
        \var{<switch designator>} | (\var{<designational expression>})

\var{<designational expression>} ::= \var{<simple designational expression>} |
        \var{<if clause>} \var{<simple designational expression>}
        \keyw{else} \var{<designational expression>}

3.5.2. Examples.

\begin{example}
17
p9
Coose[n-1]
Town [\keyw{if} y\mlt{}0 \keyw{then} N \keyw{else} N+1]
\keyw{if} Ab\mlt{}c \keyw{then} 17 \keyw{else} q[\keyw{if} w \mle{} 0 \keyw{then} 2 \keyw{else} n]
\end{example}

3.5.3.  Semantics.  A designational expression is a rule for obtaining a
label of a statement (cf.  section 4.  Statements).  Again the principle
of the evaluation is entirely analogous to that of arithmetic
expressions (section 3.3.3).  In the general case the Boolean expression
of the if clauses will select a simple designational expression.  If
this is a label the desired result is already found.  A switch
designator refers refers to the corresponding switch declaration (cf.
section 5.3.  Switch declarations) and by the actual numerical value of
its subscript expression selects one of the designational expressions
listed in the switch declaration by counting these from left to right.
Since the designational expression thus selected may again by a switch
designator this evaluation is obviously a recursive process.

3.5.4.  The subscript expression.  The evaluation of the subscript
expression is analogous to that of subscripted variables (cf.  section
3.1.4.2).  The value of a switch designator is defined only if the
subscript expression assumes one of the positive values 1, 2, 3, ..., n,
where n is the number of entries in the switch list. 

3.5.5.  Unsigned integers as labels.  Unsigned integers used as labels
have the property that leading zeroes do not affect their meaning, e.g. 
00127 denotes the same label as 217. 




\node Statements, Declarations, Expressions, Description

\subsection*{ 4. Statements }



The units of operation within the language are called statements.  The
will normally be executed consecutively as written.  However, this
sequence of operations may be broken by go to statements, which define
their successor explicitly, and shortened by conditional statements,
which may cause certain statements to be skipped. 

In order to make it possible to define a specific dynamic succession,
statements may be provided with labels. 

Since sequences of statements may be grouped together into compound
statements and blocks the definition of statement must necessarily be
recursive.  Also since declarations, described in section 5, enter
fundamentally into the syntactic structure, the syntactic definition of
statements must suppose declarations to be already defined. 



\subsubsection*{ 4.1. Compound statements and blocks }


4.1.1 Syntax

\var{<unlabelled basic statement>} ::= \var{<assignment statement>} |
        \var{<go to statement>} | \var{<dummy statement>} |
        \var{<procedure statement>}

\var{<basic statement>} ::= \var{<unlabelled basic statement>} |
        \var{<label>}: \var{<basic statement>}

\var{<unconditional statement>} ::= \var{<basic statement>} |
        \var{<compound statement>} | \var{<block>}

\var{<statement>} ::= \var{<unconditional statement>} |
        \var{<conditional statement>} | \var{<for statement>}

\var{<compound tail>} ::= \var{<statement>} \keyw{end} |
        \var{<statement>} ; \var{<compound tail>}

\var{<block head>} ::= \keyw{begin} \var{<declaration>} |
        \var{<block head>} ; \var{<declaration>}

\var{<unlabelled compound>} ::= \keyw{begin} \var{<compound tail>}

\var{<compound statement>} ::= \var{<unlabelled compound>} |
        \var{<label>}: \var{<compound statement>}

\var{<block>} ::= \var{<unlabelled block>} | \var{<label>}: \var{<block>}

\var{<program>} ::= \var{<block>} | \var{<compound statement>}

This syntax may be illustrated as follows: Denoting arbitrary
statements, declarations, and labels, by the letters S, D, L,
respectively, the basic syntactic units take the forms:

Compound statement:
\begin{example}
L:L: ... \keyw{begin} S; S; ... S; S \keyw{end}
\end{example}

Block:
\begin{example}
L:L: ... \keyw{begin} D; D; .. D; S; S; ... S; S \keyw{end}
\end{example}

It should by kept in mind that each of the statements S may again be a
complete compound statement or a block. 


4.1.2. Examples.

Basic statements:

\begin{example}
a:=p+q
\keyw{goto} Naples
Start: Continue: W:=7.993
\end{example}

Compound statements:

\begin{example}
\keyw{begin} x:=0; \keyw{for} y:=1 \keyw{step} 1 \keyw{until} n \keyw{do} x:=x+A[y];
        \keyw{if} x\mgt{}q \keyw{then} \keyw{goto} STOP \keyw{else} \keyw{if} x\mgt{}w-2 \keyw{then} \keyw{goto} S;
        Aw: St: W:=x+bob \keyw{end}
\end{example}

Block:

\begin{example}
Q: \keyw{begin} \keyw{integer} i, k; \keyw{real} w;
    \keyw{for} i:=1 \keyw{step} 1 \keyw{until} m \keyw{do}
        \keyw{for} k:=i+1 \keyw{step} 1 \keyw{until} m \keyw{do}
        \keyw{begin} w:=A[i,k];
            A[i,k]:=A[k,i];
            A[k,i]:=w \keyw{end} for i and k
   \keyw{end} block Q
\end{example}


4.1.3.  Semantics.  Every block automatically introduces a new level of
nomenclature.  This is realized as follows: Any identifier occurring
within the block my through a suitable declaration (cf.  section 5. 
Declarations) be specified to be local to the block in question.  This
means (a) that the entity represented by this identifier inside the
blocks has no existence outside it and (b) that any entity represented
by this identifier outside the block is completely inaccessible inside
the block. 

Identifiers (except those representing labels) occurring within a block
and not being declared to this block will be non-local to it, i.e.  will
represent the same entity inside the block and in the level immediately
outside it.  A label separated by a colon from a statement, i.e. 
labelling that statement, behaves as though declared in the head of the
smallest embracing block, i.e.  the smallest block whose brackets
\keyw{begin} and \keyw{end} enclose that statement.  In this context a
procedure body must be considered as if it were enclosed by \keyw{begin}
and \keyw{end} and treated as a block. 

Since a statement of a block may again itself be a block the concepts
local and non-local to a block must be understood recursively.  Thus an
identifier, which is non-local to a block A, may or may not be non-local
to the block B in which A is one statement. 




\subsubsection*{ 4.2. Assignment statements }


4.2.1. Syntax.

\var{<left part>} ::= \var{<variable>} := | \var{<procedure identifier>} :=

\var{<left part list>} ::= \var{<left part>} | \var{<left part list>} 
        \var{<left part>}

\var{<assignment statement>} ::= \var{<left part list>}
        \var{<arithmetic expression>} | \var{<left part list>}
        \var{<Boolean expression>}

4.2.2. Examples.

\begin{example}
s:=p[0]:=n:=n+1+s
n:=n+1
A:=B/C-v-q\mtim{}S
S[v,k+2]:=3-arctan(s\mtim{}zeta)
V:=Q\mgt{}Y\mland{}Z
\end{example}

4.2.3.  Semantics.  Assignment statements serve for assigning the value
of an expression to one or several variables or procedure identifiers. 
Assignment to a procedure identifier may only occur within the body of a
procedure defining the value of a function designator (cf.  section
5.4.4).  The process will in the general case be understood to take
place in three steps as follows:

4.2.3.1.  Any subscript expression occurring in the left part variables
are evaluated in sequence from left to right. 

4.2.3.2. The expression of the statement is evaluated.

4.2.3.3.  The value of the expression is assigned to all the left part
variables, with any subscript expressions having values as evaluated in
step 4.2.3.1. 

4.2.4.  Types.  The type associated with all variables and procedure
identifiers of a left part list must be the same.  If the type is
\keyw{Boolean}, the expression must likewise be \keyw{Boolean}.  If the
type is \keyw{real} or \keyw{integer}, the expression must be
arithmetic.  If the type of the arithmetic expression differs from that
associated with the variables and procedure identifiers, appropriate
transfer functions are understood to be automatically invoked.  For
transfer from \keyw{real} to \keyw{integer} type the transfer function
is understood to yield a result equivalent to

\begin{example}
    entier(E+0.5)
\end{example}

where E is the value of the expression.  The type associated with a
procedure identifier is given by the declarator which appears as the
first symbol of the corresponding procedure declaration (cf.  section
5.4.4). 



\subsubsection*{ 4.3. Go to statements }


4.3.1. Syntax

\var{<go to statement>} ::= \keyw{goto} \var{<designational expression>}

4.3.2. Examples.

\begin{example}
\keyw{goto} 8
\keyw{goto} exit [n+1]
\keyw{goto} Town [\keyw{if} y\mlt{}0 \keyw{then} N \keyw{else} N+1]
\keyw{goto} \keyw{if} Ab\mlt{}c \keyw{then} 17 \keyw{else} q [\keyw{if} w\mlt{}0 \keyw{then} 2 \keyw{else} n]
\end{example}

4.3.3.  Semantics.  A go to statement interrupts the normal sequence of
operations, defined by the write-up of statements, by defining its
successor explicitly by the value of a designational expression.  Thus
the next statement to be executed will be the one having this value as
its label. 

4.3.4.  Restriction.  Since labels are inherently local, no go to
statement can lead from outside into a block.  A go to statement may,
however, lead from outside into a compound statement. 

4.3.5.  Go to an undefined switch designator.  A go to statement is
equivalent to a dummy statement if the designational expression is a
switch designator whose value is undefined. 



\subsubsection*{ 4.4. Dummy statements }


4.4.1. Syntax

\var{<dummy statement>} ::= \var{<empty>}

4.4.2. Examples.

\begin{example}
L:
\keyw{begin} ....; John: \keyw{end}
\end{example}

4.4.3.  Semantics.  A dummy statement executes no operation.  It may
serve to place a label. 



\subsubsection*{ 4.5. Conditional statements }


4.5.1. Syntax

\var{<if clause>} ::= \keyw{if} \var{<Boolean expression>} \keyw{then}

\var{<unconditional statement>} ::= \var{<basic statement>} |
        \var{<compound statement>} | \var{<block>}

\var{<if statement>} ::= \var{<if clause>} \var{<unconditional statement>}

\var{<conditional statement>} ::= \var{<if statement>} |
        \var{<if statement>} \keyw{else} \var{<statement>} |
        \var{<if clause>} \var{<for statement>} |
        \var{<label>}: \var{<conditional statement>}

4.5.2. Examples.

\begin{example}
\keyw{if} x\mgt{}0 \keyw{then} n:=n+1
\keyw{if} s\mgt{}u \keyw{then} V: q:=n+m \keyw{else} \keyw{goto} R
\keyw{if} s\mlt{}0 \mlor{} P\mle{}Q \keyw{then} AA: \keyw{begin} \keyw{if} q\mlt{}v \keyw{then} a:=v/s
        \keyw{else} y:=2\mtim{}a \keyw{end} \keyw{else} \keyw{if} v\mgt{}s \keyw{then} a:=v-q
        \keyw{else} \keyw{if} v\mgt{}s-1 \keyw{then} \keyw{goto} S
\end{example}

4.5.3.  Semantics.  Conditional statements cause certain statements to
be executed or skipped depending on the running values of specified
Boolean expressions. 

4.5.3.1.  If statement.  The unconditional statement of an if statement
will be executed if the Boolean expression of the if clause is true. 
Otherwise it will be skipped and the operation will be continued with
the next statement. 

4.5.3.2.  Conditional statement.  According to the syntax two different
forms of conditional statements are possible.  These may be illustrated
as follows:

\begin{example}
\keyw{if} B1 \keyw{then} S1 \keyw{else} \keyw{if} B2 \keyw{then} S2 \keyw{else} S3; S4
\end{example}

\begin{example}
\keyw{if} B1 \keyw{then} S1 \keyw{else} \keyw{if} B2 \keyw{then} S2 \keyw{else} \keyw{if} B3 \keyw{then} S3; S4
\end{example}

Here B1 to B3 are Boolean expressions, while S1 to S3 are unconditional
statements.  S4 is the statement following the complete conditional
statement. 

The execution of a conditional statement may be described as follows:
The Boolean expression of the if clause are evaluated one after the
other in sequence from left to right until one yielding the value
\keyw{true} is found.  Then the unconditional statement following this
Boolean is executed.  Unless this statement defines its successor
explicitly the next statement to be executed will be S4, i.e.  the
statement following the complete complete conditional statement.  Thus
the effect of the delimiter \keyw{else} may be described by saying that
it defines the successor of the statement it follows to be the statement
following the complete conditional statement. 

The construction

\begin{example}
\keyw{else} \var{<unconditional statement>}
\end{example}

is equivalent to

\begin{example}
\keyw{else} \keyw{if} \keyw{true} \keyw{then} \var{<unconditional statement>}
\end{example}

If none of the Boolean expressions of the if clauses is true, the effect
of the whole conditional statement will be equivalent to that of a dummy
statement. 

For further explanation the following picture may be useful:

\begin{iftex}
\begin{example}
               +-----------------+------+
               ^                 ^      |
               |                 |      v
\keyw{if} B1 \keyw{then} S1 \keyw{else} \keyw{if} B2 \keyw{then} S2 \keyw{else} S3; S4
   |              ^  |               ^
   v              |  v               |
   +--------------+  +---------------+
\end{example}
\end{iftex}

\begin{ifinfo}
\begin{example}
                    +------------------------+--------+
                    ^                        ^        |
                    |                        |        v
\keyw{if} B1 \keyw{then} S1 \keyw{else} \keyw{if} B2 \keyw{then} S2 \keyw{else} S3; S4
     |                    ^   |                   ^
     v                    |   v                   |
     +--------------------+   +-------------------+
\end{example}
\end{ifinfo}

4.5.4.  Go to into a conditional statement.  The effect of a go to
statement leading into a conditional statement follows directly from the
above explanation of the effect of \keyw{else}. 



\subsubsection*{ 4.6. For statements }


4.6.1. Syntax

\var{<for list element>} ::= \var{<arithmetic expression>} | 
        \var{<arithmetic expression>} \keyw{step} \var{<arithmetic expression>}
        \keyw{until} \var{<arithmetic expression>} |
        \var{<arithmetic expression>} \keyw{while} \var{<Boolean expression>}

\var{<for list>} ::= \var{<for list element>} | \var{<for list>} ,
        \var{<for list element>}

\var{<for clause>} ::= \keyw{for} \var{<variable>} := \var{<for list>} \keyw{do}

\var{<for statement>} ::= \var{<for clause>} \var{<statement>} |
        \var{<label>}: \var{<for statement>}

4.6.2. Examples.

\begin{example}
\keyw{for} q:=1 \keyw{step} s \keyw{until} n \keyw{do} A[q]:=B[q]
\keyw{for} k:=1,V1\mtim{}2 \keyw{while} V1\mlt{}N \keyw{do}
\keyw{for} j:=I+G,L,1 \keyw{step} 1 \keyw{until} N, C+D \keyw{do} A[k,j]:=B[k,j]
\end{example}

4.6.3.  Semantics.  A for clause causes the statement S which it precedes
to be repeatedly executed zero or more times.  In addition it performs a
sequence of assignments to its controlled variable.  The process may be
visualized by means of the following picture:

\begin{example}
              +------------------+
              |                  ^
              v                  |
Initialize; test; statement S; advance; successor
              |                             ^
              v                             |
              +-----------------------------+
\end{example}

In this picture the word initialize means: perform the first assignment
of the for clause.  Advance means: perform the next assignment of the
for clause.  Test determines if the last assignment has been done.  If
so, the execution continues with the successor of the for statement.  If
not, the statement following the for clause is executed. 

4.6.4.  The for list elements.  The for list gives a rule for obtaining
the values which are consecutively assigned to the controlled variable. 
This sequence of values is obtained from the for list elements by taking
these one by one in order in which they are written.  The sequence of
values generated by each of the three species of for list elements and
the corresponding execution of the statement S are given by the
following rules:

4.6.4.1.  Arithmetic expression.  This element gives rise to one value,
namely the value of the given arithmetic expression as calculated
immediately before the corresponding execution of the statement S. 

4.6.4.2.  Step-until-element.  An element of the form A \keyw{step} B
\keyw{until} C, where A, B, and C are arithmetic expressions, gives rise
to an execution which may be described most concisely in terms of
additional Algol statement as follows:

\begin{example}
     V := A
L1:  \keyw{if} (V-C)\mtim{}sign(B) \mgt{} 0 \keyw{then} \keyw{goto} ``Element exhausted'';
     Statement S;
     V := V+B;
     \keyw{goto} L1;
\end{example}

where V is the controlled variable of the for clause and `Element
exhausted' points to the evaluation according to the next element in the
for list, or if the step-until-element is the last of the list, to the
next statement in the program. 

4.6.4.3.  While-element.  The execution governed by a for list element
of the form E \keyw{while} F, where E is an arithmetic and F a Boolean
expression, is most concisely described in terms of additional Algol
statements as follows:

\begin{example}
L3:  V := E
     \keyw{if} \mlnot{} F \keyw{then} \keyw{goto} ``Element exhausted'';
     Statement S;
     \keyw{goto} L3;
\end{example}

where the notation is the same as in 4.6.4.2 above.

4.6.5.  The value of the controlled variable upon exit.  Upon exit out
of the statement S (supposed to be compound) through a go to statement
the value of the controlled variable will be the same as it was
immediately preceding the execution of the go to statement. 

If the exit is due to exhaustion of the for list, on the other hand, the
value of the controlled variable is undefined after the exit. 

4.6.6.  Go to leading into a for statement.  The effect of a go to
statement, outside a for statement, which refers to a label within the
for statement, is undefined. 



\subsubsection*{ 4.7. Procedure statements }


4.7.1. Syntax

\var{<actual parameter>} ::= \var{<string>} | \var{<expression>} |
        \var{<array identifier>} | \var{<switch identifier>} |
        \var{<procedure identifier>}

\var{<letter string>} ::= \var{<letter>} | \var{<letter string>} \var{<letter>}

\var{<parameter delimiter>} ::= , | ) \var{<letter string>} : (

\var{<actual parameter list>} ::= \var{<actual parameter>} |
        \var{<actual parameter list>} \var{<parameter delimiter>}
        \var{<actual parameter>}

\var{<actual parameter part>} ::= \var{<empty>} | ( \var{<actual parameter list>} )

\var{<procedure statement>} ::= \var{<procedure identifier>}
        \var{<actual parameter part>}

4.7.2. Examples.

\begin{example}
Spur (A) Order: (7) Result to: (V)
Transpose (W, v+1)
Absmax (A, N, M, Yy, I, K)
Innerproduct (A [t,P,u], B [P], 10, P, Y)
\end{example}

These examples correspond to examples given in section 5.4.2.

4.7.3.  Semantics.  A procedure statement serves to invoke (call for)
the execution of a procedure body (cf.  section 5.4.  procedure
declarations).  Where the procedure body is a statement written in Algol
the effect of this execution will be equivalent to the effect of
performing the following operations on the program at the time of
execution of the procedure statement. 

4.7.3.1.  Value assignment (call by value).  All formal parameters
quoted in the value part of the procedure declaration heading are
assigned the values (cf.  section 2.8.  Values and types) of the
corresponding actual parameters, these assignments being considers as
being performed explicitly before entering the procedure body.  The
effect is as though an additional block embracing the procedure body
were created in which these assignments were made to variables local to
this fictitious block with types as given in the corresponding
specifications (cf.  section 5.4.5).  As a consequence, variables called
by value are to be considered as nonlocal to the body of the procedure,
but local to the fictitious block (cf.  section 5.4.3). 

4.7.3.2.  Name replacement (call by name).  Any formal parameter not
quoted in the value list is replaced, throughout the procedure body, by
the corresponding actual parameter, after enclosing this latter in
parentheses wherever syntactically possible.  Possible conflicts between
identifiers inserted through this process and other identifiers already
present within the procedure body will be avoided by suitable systematic
changes of the formal or local identifiers involved. 

4.7.3.3.  Body replacement and execution.  Finally the procedure body,
modified as above, is inserted in place of the procedure statement and
executed.  if the procedure is called from a place outside the scope of
any non-local quantity of the procedure bode the conflicts between the
identifiers inserted through this process of body replacement and the
identifiers whose declarations are valid at the place of the procedure
statement or function designator will be avoided through suitable
systematic changes of the latter identifiers. 

4.7.4.  Actual-formal correspondence.  The correspondence between the
actual parameters of the procedure statement and the formal parameters
of the procedure heading is established as follows: The actual parameter
list of the procedure statement must have the same number of entries as
the formal parameter list of the procedure declaration heading.  The
correspondence is obtained by taking the entries of these two lists in
the same order. 

4.7.5.  Restrictions.  For a procedure statement to be defined it is
evidently necessary that the operations on the procedure body defined in
sections 4.7.3.1 and 4.7.3.2 lead to a correct Algol statement. 

This imposes the restriction on any procedure statement that the kind
and type of each actual parameter to be compatible with the kind and
type of the corresponding formal parameter.  Some important particular
cases of this general rule are the following:

4.7.5.1.  If a string is supplied as an actual parameter in a procedure
statement or function designator, whose defining procedure body is an
Algol 60 statement (as opposed to non-Algol code, cf.  section 4.7.8),
then this string can only be used within the procedure body as an actual
parameter in further procedure calls.  Ultimately it can only be used by
a procedure body expressed in non-Algol code. 

4.7.5.2.  A formal parameter which occurs as a left part variable in an
assignment statement within the procedure body and which is not called
by value can only correspond to an actual parameter which is a variable
(special case of expression). 

4.7.5.3.  A formal parameter which is used within the procedure body as
an array identifier can only correspond to an actual parameter which is
an array identifier of an array of the same dimensions.  In addition if
the formal parameter is called by value the local array created during
the call will have the same subscript bounds as the actual array. 

4.7.5.4.  A formal parameter which is called by value cannot in general
correspond to a switch identifier or a procedure identifier or a string,
because these latter do not possess values (the exception is the
procedure identifier of a procedure declaration which has an empty
formal parameter part (cf.  section 5.4.1) and which defines the value
of a function designator (cf.  section 5.4.4).  This procedure
identifier is in itself a complete expression). 

4.7.5.5.  Any formal parameter may have restrictions on the type of the
corresponding actual parameter associated with it (these restrictions
may, or may not, be given through specifications in the procedure
heading).  In the procedure statement such restrictions must evidently
be observed. 

4.7.6. Deleted.

4.7.7.  Parameter delimiters.  All parameter delimiters are understood
to be equivalent.  No correspondence between the parameter delimiters
used in a procedure statement and those used in the procedure heading is
expected beyond their number is the same.  Thus the information conveyed
by using the elaborate ones is entirely optional. 

4.7.8.  Procedure body expressed in code.  The restrictions imposed on a
procedure statement calling a procedure having its body expressed in
non-Algol code evidently can only be derived from the characteristics of
the code used and the intent of the user and thus fall outside the scope
of the reference language. 



\node Declarations, Examples, Statements, Description

\subsection*{ 5. Declarations }



Declarations serve to define certain properties of the quantities used
in the program, and to associate them with identifiers.  A declaration
of an identifier is valid for one block.  Outside this block the
particular identifier may be used for other purposes (cf.  section
4.1.3). 

Dynamically this implies the following: at the time of an entry into a
block (through the \keyw{begin} since the labels inside are local and
therefore inaccessible from outside) all identifiers declared for the
block assume the significance implied by the nature of the declarations
given.  If these identifiers had already been defined by other
declarations outside they are for the time being given a new
significance.  Identifiers which are not declared for the block, on the
other hand, retain their old meaning. 

At the time of an exit from an block (through \keyw{end}, or by a go to
statement) all identifiers which are declared for the block lose their
local significance. 

A declaration my be marked with the additional declarator \keyw{own}. 
This has the following effect: upon a reentry into the block, the values
of own quantities will be unchanged from their values at the last exit,
while the values of declared variables which are not marked as own are
undefined.  Apart from labels and formal parameters of procedure
declarations and with the possible exception of those for standard
functions (cf.  sections 3.2.4 and 3.2.5) all identifiers of a program
must be declared.  No identifier may be declared more than once in any
one block head. 

Syntax.

\var{<declaration>} ::= \var{<type declaration>} | \var{<array declaration>} |
        \var{<switch declaration>} | \var{<procedure declaration>}



\subsubsection*{ 5.1. Type declarations }


5.1.1 Syntax.

\var{<type list>} ::= \var{<simple variable>} | \var{<simple variable>} , \var{<type list>}

\var{<type>} ::= \keyw{real} | \keyw{integer} | \keyw{Boolean}

\var{<local or own type>} ::= \var{<type>} | \keyw{own} \var{<type>}

\var{<type declaration>} ::= \var{<local or own type>} \var{<type list>}

5.1.2. Examples.

\begin{example}
\keyw{integer} p, q, s
\keyw{own} \keyw{Boolean} Acryl, n
\end{example}

5.1.3.  Semantics.  Type declarations serve to declare certain
identifiers to represent simple variables of a given type.  Real
declared variables may only assume positive or negative values including
zero.  Integer declared variables may only assume positive and negative
integral values including zero.  Boolean declared variables may only
assume the values \keyw{true} and \keyw{false}. 

In arithmetic expressions any position which can be occupied by a real
declared variable may be occupied by an integer declared variable. 

For the semantics of \keyw{own}, see the fourth paragraph of section 5
above. 



\subsubsection*{ 5.2. Array declarations }


5.2.1 Syntax.

\var{<lower bound>} ::= \var{<arithmetic expression>}

\var{<upper bound>} ::= \var{<arithmetic expression>}

\var{<bound pair>} ::= \var{<lower bound>} : \var{<upper bound>}

\var{<bound pair list>} ::= \var{<bound pair>} |
        \var{<bound pair list>} , \var{<bound pair>}

\var{<array segment>} ::= \var{<array identifier>} [ \var{<bound pair list>} ] |
        \var{<array identifier>} , \var{<array segment>}

\var{<array list>} ::= \var{<array segment>} | \var{<array list>} ,
        \var{<array segment>}

\var{<array declaration>} ::= \keyw{array} \var{<array list>} |
        \var{<local or own type>} \keyw{array} \var{<array list>}

5.2.2. Examples.

\begin{example}
\keyw{array} a, b, c [7:n, 2:m], s [-2:10]
\keyw{own} \keyw{integer} \keyw{array} A [\keyw{if} c\mlt{}0 \keyw{then} 2 \keyw{else} 1:20]
\keyw{real} \keyw{array} q [-7:-1]
\end{example}

5.2.3.  Semantics.  An array declaration declares one or several
identifiers to represent multidimensional arrays of subscripted
variables and gives the dimensions of the arrays, the bound of the
subscripts, and the types of the variables. 

5.2.3.1.  Subscript bounds.  The subscript bounds for any array are
given in the first subscript bracket following the identifier of this
array in the form of a bound pair list.  Each item of this list gives
the lower and upper bound of a subscript in the form of two arithmetic
expressions separated by the delimiter :.  The bound pair list gives the
bounds of all subscripts taken in order from left to right. 

5.2.3.2.  Dimensions.  The dimensions are given as the number of entries
in the bound pair list. 

5.2.3.3.  Types.  All arrays declared in one declaration are of the same
quoted type.  If no type declarator is given the type \keyw{real} is
understood. 

5.2.4. Lower upper bound expressions.

5.2.4.1.  The expressions will be evaluated in the same way as subscript
expressions (cf.  section 3.1.4.2). 

5.2.4.2.  The expressions can only depend on variables and procedures
which are non-local to the block for which the array declaration is
valid.  Consequently in the outermost block of a program only array
declarations with constant bounds may be declared. 

5.2.4.3.  An array identifier id defined only when the values of all
upper subscript bounds are not smaller than those of the corresponding
lower bounds. 

5.2.4.4.  The expressions will by evaluated once at each entrace into
the block. 

5.2.5.  The identity of subscripted variables.  The identity of a
subscripted variable is not related to the subscript bounds given in the
array declaration.  However, even if an array is declared \keyw{own} the
values of the corresponding subscripted variables will, at any time, be
defined only for those of these variables which have subscripts within
the most recently calculated subscript bounds. 



\subsubsection*{ 5.3. Switch declarations }


5.3.1 Syntax.

\var{<switch list>} ::= \var{<designational expression>} |
        \var{<switch list>} , \var{<designational expression>}

\var{<switch declaration>} ::= \keyw{switch} \var{<switch identifier>}
        := \var{<switch list>}

5.3.2. Examples.

\begin{example}
\keyw{switch} S:=S1,S2,Q[m], \keyw{if} v\mgt{}-5 \keyw{then} S3 \keyw{else} S4
\keyw{switch} Q:=p1,w
\end{example}

5.3.3.  Semantics.  A switch declaration defines the set of values of
the corresponding switch designators.  These values are given one by one
as the values of the designational expressions entered in the switch
list.  With each of these designational expressions there is associated
a positive integer, 1, 2, ..., obtained by counting the items in the
list from left to right.  The value of the switch designator
corresponding to a given value of the subscript expression (cf.  section
3.5.  Designational expressions) is the value of the designational
expression in the switch list having this given value as its associated
integer. 

5.3.4.  Evaluation of expressions in the switch list.  An expression in
the switch list will be evaluated every time the item of the list in
which the expression occurs is referred to, using the current values of
all variables involved. 

5.3.5.  Influence of scopes.  If a switch designator occurs outside the
scope of a quantity entering into a designational expression in the
switch list, and an evaluation of this switch designator selects this
designational expression, then the conflicts between the identifiers for
the quantities in this expression and the identifiers whose declarations
are valid at the place of the switch designator will be avoided through
suitable systematic changes of the latter identifiers. 



\subsubsection*{ 5.4. Procedure declarations }


5.4.1 Syntax.

\var{<formal parameter>} ::= \var{<identifier>} 

\var{<formal parameter list>} ::= \var{<formal parameter>} |
        \var{<formal parameter list>} \var{<parameter delimiter>}
        \var{<formal parameter>}

\var{<formal parameter part>} ::= \var{<empty>} | ( \var{<formal parameter list>} )

\var{<identifier list>} ::= \var{<identifier>} |
        \var{<identifier list>} , \var{<identifier>}

\var{<value part>} ::= \keyw{value} \var{<identifier list>} ; |
        \var{<empty>}

\var{<specifier>} ::= \keyw{string} | \var{<type>} | \keyw{array} |
        \var{<type>} \keyw{array} | \keyw{label} | \keyw{switch} |
        \keyw{procedure} | \var{<type>} \keyw{procedure}

\var{<specification part>} ::= \var{<empty>} | \var{<specifier>} \var{<identifier list>} ; |
        \var{<specification part>} \var{<specifier>} \var{<identifier list>}

\var{<procedure heading>} ::= \var{<procedure identifier>} \var{<formal parameter part>} ;
        \var{<value part>} \var{<specification part>}

\var{<procedure body>} ::= \var{<statement>} | \var{<code>}

\var{<procedure declaration>} ::= \keyw{procedure} \var{<procedure heading>}
        \var{<procedure body>} | \var{<type>} \keyw{procedure}
        \var{<procedure heading>} \var{<procedure body>}\refill

\sp{1}

5.4.2. Examples (see also the examples at the end of the report).

\begin{example}
\keyw{procedure} Spur (a) Order: (n); \keyw{value} n;
\keyw{array} a; \keyw{integer} n; \keyw{real} s;
\keyw{begin} \keyw{integer} k;
s:=0;
\keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do} s:=s+a[k,k]
\keyw{end}

\keyw{procedure} Transpose (a) Order: (n); \keyw{value} n;
\keyw{array} a; \keyw{integer} n;
\keyw{begin} \keyw{real} w; \keyw{integer} i, k;
\keyw{for} i := 1 \keyw{step} 1 \keyw{until} n \keyw{do}
    \keyw{for} k := 1+i \keyw{step} 1 \keyw{until} n \keyw{do}
        \keyw{begin} w:=a[i,k];
                a[i,k]:=a[k,i];
                a[k,i]:=w
        \keyw{end}
\keyw{end} Transpose

\keyw{integer} \keyw{procedure} Step (u); \keyw{real} u;
Step:=\keyw{if} 0\mle{}u\mland{}u\mle{}1 \keyw{then} 1 \keyw{else} 0

\keyw{procedure} Absmax (a) Size: (n, m) Result: (y) Subscripts: (i, k);
\keyw{comment} The absolute greatest element of the matrix a, of size n by m
is transferred to y, and the subscripts of this element to i and k;
\keyw{array} a; \keyw{integer} n, m, i, k; \keyw{real} y;
\keyw{begin} \keyw{integer} p, q;
y := 0;
\keyw{for} p:=1 \keyw{step} 1 \keyw{until} n \keyw{do} \keyw{for} q:=1 \keyw{step} 1 \keyw{until} m \keyw{do}
\keyw{if} abs(a[p,q]])\mgt{}y \keyw{then} \keyw{begin} y:=abs(a[p,q]);
    i:=p; k:=q \keyw{end} \keyw{end} Absmax

\keyw{procedure} Innerproduct (a, b) Order: (k, p) Result: (y); \keyw{value} k;
\keyw{integer} k, p; \keyw{real} y, a, b;
s:=0;
\keyw{for} p:=1 \keyw{step} 1 \keyw{until} k \keyw{do} s:=s+a\mtim{}b;
y:=s
\keyw{end} Innerproduct
\end{example}


5.4.3.  Semantics.  A procedure declaration serves to define the
procedure associated with a procedure identifier.  The principal
constituent of a procedure declaration is a statement or a piece of
code, the procedure body, which through the use of procedure statements
and/or function designators may be activated from other parts of the
block in the head of which the procedure declaration appears. 
Associated with the body is a heading, which specifies certain
identifiers occurring within the body to represent formal parameters. 
Formal parameters in the procedure body will, whenever the procedure is
activated (cf.  section 3.2.  Function designators and section 4.7. 
Procedure statements) be assigned the values of or replaced by actual
parameters.  Identifiers in the procedure body which are not formal will
be either local or non-local to the body depending on whether they are
declared within the body or not.  Those of them which are non-local to
the body may well be local to the block in the head of which the
procedure declaration appears.  The procedure body always acts like a
block, whether it has the form of one or not.  Consequently the scope of
any label labelling a statement within the body or the body itself can
never extended beyond the procedure body.  In addition, if the
identifier of a formal parameter is declared anew within
the procedure body (including the case of its use as a label in section
4.1.3), it is thereby given a local significance and actual parameters
which correspond to it are inaccessible throughout the scope of its
inner local quantity.\refill 

5.4.4.  Values of function designators.  For a procedure declaration to
define the value of a function designator there must, within the
procedure declaration body, occur one or more explicit assignment
statements with the procedure identifier in a left part; at least one of
these must be executed, and the type associated with the procedure
identifier must be declared through the appearance of a type declarator
as the very first symbol of the procedure declaration.  The last value
so assigned is used to continue the evaluation of the expression in
which the function designator occurs.  Any occurrence of the procedure
identifier within the body of the procedure other than in a left part in
an assignment statement denotes activation of the procedure. 

5.4.5.  Specifications.  In the heading a specification part, giving
information about the kinds and types of the formal parameters by means
of an obvious notation, may be included.  In this part no formal
parameter may occur more than once.  Specification of formal parameters
called by value (cf.  section 4.7.3.1) must be supplied and
specifications of formal parameters called by name (cf.  section
4.7.3.2) may be omitted. 

5.4.6.  Code as procedure body.  It is understood that the procedure
body may be expressed in non-Algol language.  Since it is intended that
the use of this feature should be entirely a question of hardware
representation, no further rules concerning this code language can be
given within the reference language. 



\node Examples, Index ,Index, Description

\subsection*{ Examples of procedure declarations }


\subsection*{ Example 1 }


\begin{example}
\keyw{procedure} euler (fct,sum,eps,tim); \keyw{value} eps,tim; \keyw{integer} tim;
\keyw{real} \keyw{procedure} fct; \keyw{real} sum,eps;
\keyw{comment} euler computes the sum of fct(i) for i from zero up to
infinity by means of a suitably refined euler transformation. The
summation is stopped as soon as tim times in succession the absolute
value of the terms of the transformed series are found to be less than
eps. Hence, one should provide a function fct with one integer argument,
an upper bound eps, and an integer tim. The output is the sum sum. euler
is particularly efficient in the case of a slowly convergent or
divergent alternating series;
\keyw{begin} \keyw{integer} i,k,n,t; \keyw{array} m[0:15]; \keyw{real} mn,mp,ds;
i:=n; t:=0; m[0]:=fct(0); sum:=m[0]/2;
nextterm: i:=i+1; mn:=fct(i);
        \keyw{for} k:=0 \keyw{step} 1 \keyw{until} n \keyw{do}
            \keyw{begin} mp:=(mn+m[k])/2; m[k]:=mn;
                mn:=mp \keyw{end} means;
        \keyw{if} (abs(mn)\mlt{}abs(m[n])) \mland{} (n\mlt{}15) \keyw{then}
            \keyw{begin} ds:=mn/2; n:=n+1; m[n]:=mn \keyw{end} accept
        \keyw{else} ds:=mn;
        sum:=sum+ds;
        \keyw{if} abs(ds)\mlt{}eps \keyw{then} t:=t+1 \keyw{else} t:=0;
        \keyw{if} t\mlt{}tim \keyw{then} \keyw{goto} nextterm
\keyw{end} euler
\end{example}


\subsection*{ Example 2 (1) }

(1) This RK-program contains some new ideas which are related to ideas
    of S.  Gill, A process for the step by step integration of
    differential equations in an automatic computing machine.  Proc. 
    Camb.  Phil.  Soc.  47 (1951) p.  96, and E.  Fr\oe{}berg, On the
    solution of ordinary differential equations with digital computing
    machines, Fysiograf.  S\ae{}llsk.  Lund, F\oe{}rhd.  20 Nr.  11
    (1950) p. 136-152.  It must be clear however that with respect to
    computing time and round-off errors it may not be optimal, nor has
    it actually been tested on a computer. 

\begin{example}
\keyw{procedure} RK (x,y,n,FKT,eps,eta,xE,yE,fi); \keyw{value} x,y; \keyw{integer} n;
\keyw{Boolean} fi; \keyw{real} x,eps,eta,xE; \keyw{array} y,yE; \keyw{procedure} FKT;
\keyw{comment} RK integrates the system y'k=fk(x,y1,y2,...,yn)(k=1,2,...n)
of differential equations with the method of Runge-Kutta with automatic
search for appropriate length of integration step. Parameters are: The
initial values x and y[k] for x and the unknown functions yk(x). The
order n of the system. The procedure FKT(x,y,n,z) which represents the
system to be integrated, i.e. the set of functions fk. The tolerance values eps
and eta which govern the accuracy of the numerical integration. The end
of the integration interval xE; The output parameter yE which represents
the solution x=xE. The Boolean variable fi, which must always be given 
the value \keyw{true} for an isolated or first entry into RK. If however the functions
y must be available at several meshpoints x0,x1,...,xn, then the procedure
must be called repeatedly (with x=xk, xE=x(k+1), for k=0,1,...,n-1)
and then the later calls may occur with fi=\keyw{false} which saves computing
time. The input parameters of FKT must be x,y,z,n, the output parameter z
represents the set of derivatives z[k]=fk(x,y[1],y[2],...,y[n]) for x and
the actual y's. A procedure comp enters as a non-local identifier;

\keyw{begin}
    \keyw{array} z,y1,y2,y3[1:n]; \keyw{real} x1,x2,x3,H; \keyw{Boolean} out;
    \keyw{integer} k,j; \keyw{own} \keyw{real} s,Hs;
    \keyw{procedure} RK1ST (x,y,h,xe,ye); \keyw{real} x,h,xe; \keyw{array} y,ye;
        \keyw{comment} RK1ST integrates one single Runge-Kutta step with
        initial values x, y[k] which yields the output parameters xe=x+h
        and ye[k], the latter being the solution at xe.  Important: the
        parameters n, FKT, z enter RK1ST as nonlocal entities;
        \keyw{begin}
            \keyw{array} w[1:n], a[1:5]; \keyw{integer} k,j;
            a[1]:=a[2]:=a[5]:=h/2; a[3]:=a[4]:=h;
            xe:=x;
            \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do} ye[k]:=w[k]:=y[k];
            \keyw{for} j:=1 \keyw{step} 1 \keyw{until} 4 \keyw{do}
                \keyw{begin}
                    FKT(xe,w,n,z);
                    xe:=x+a[j];
                    \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do}
                    \keyw{begin}
                        w[k]:=y[k]+a[j]\mtim{}z[k];
                        ye[k]:=ye[k]+a[j+1]\mtim{}z[k]/3
                    \keyw{end} k
                \keyw{end} j
        \keyw{end} RK1ST;

Begin of program:

    \keyw{if} fi \keyw{then} \keyw{begin} H:=xE-x; s:=0 \keyw{end} \keyw{else} H:=Hs;
    out:=\keyw{false};

AA: \keyw{if} (x+2.01\mtim{}H-xE)\mgt{}0) \mleqv{} (H\mgt{}0) \keyw{then}
    \keyw{begin} Hs:=H; out:=\keyw{true}; H:=(xE-x)/2 \keyw{end} if;
    RK1ST (x,y,2\mtim{}H,x1,y1);

BB: RK1ST (x,y,H,x2,y2); RK1ST (x2,y2,H,x3,y3);
    \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do}
        \keyw{if} comp (y1[k],y3[k],eta)\mgt{}eps \keyw{then} \keyw{goto} CC;
    \keyw{comment} comp(a,b,c) is a function designator, the value of
    which is the absolute value of the difference of the mantissae of a
    and b, after the exponents of these quantities have been made equal
    to the largest of the exponents of the originally given parameters
    a, b, c;
    x:=x3; \keyw{if} out \keyw{then} \keyw{goto} DD;
    \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do} y[k]:=y3[k];
    \keyw{if} s=5 \keyw{then} \keyw{begin} s:=0; H:=2\mtim{}H \keyw{end} if;
    s:=s+1; \keyw{goto} AA;

CC: H:=0.5\mtim{}X; out:=\keyw{false}; x1:=x2;
    \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do} y1[k]:=y2[k];
    \keyw{goto} BB;

DD: \keyw{for} k:=1 \keyw{step} 1 \keyw{until} n \keyw{do} yE[k]:=y3[k]
\keyw{end} RK
\end{example}



\node Index, Note, Declarations, Description

\subsection*{ Alphabetic index of definitions of concepts and syntactic units }


All references are given through section numbers.  The references are
given in three groups:

\begin{description}

\item[def]  Following the abbreviation ``def'', reference to the
             syntactic definition (if any) is given. 

\item[synt] Following the abbreviation ``synt'', references to the
             occurrences in metalinguistic formulae are given. 
             References already quoted in the def-group are not
             repeated. 

\item[text] Following the word ``text'', the references to definitions
             given in the text are given. 

\end{description}

The basic symbols represented by signs other than underlined words
have been collected at the beginning.  The examples have been ignored in
compiling the index. 


+ see: plus

- see: minus

\mtim{} see: multiply

/ \mdiv{} see: divide

\mpow{} see: exponentiation

\mlt{} \mle{} \meq{} \mge{} \mgt{} \mne{} see: \var{<relational operator>}

\mleqv{} \mlimp{} \mlor{} \mland{} \mlnot{} see: \var{<logical operator>}

, see: comma

. see: decimal point

\w{\ten{} see: ten}

: see: colon

; see: semicolon

:= see: colon equal

\w{\blank{} see: space}

( ) see: parentheses

[ ] see: subscript bracket

` ' see: string quote


\var{<actual parameter>}, def 3.2.1, 4.7.1\*
\var{<actual parameter list>}, def 3.2.1, 4.7.1\*
\var{<actual parameter part>}, def 3.2.1, 4.7.1\*
\var{<adding operator>}, def 3.3.1\*
alphabet, text 2.1\*
arithmetic, text 3.3.6\*
\var{<arithmetic expression>}, def 3.3.1, synt 3, 3.1.1, 3.4.1, 4.2.1,
        4.6.1, 5.2.1 text 3.3.3\*
\var{<arithmetic operator>}, def 2.3 text 3.3.4\*
\keyw{array}, synt 2.3, 5.2.1, 5.4.1\*
array, text 3.1.4.1\*
\var{<array declaration>}, def 5.2.1 synt 5 text 5.2.3\*
\var{<array identifier>}, def 3.1.1 synt 3.2.1, 4.7.1, 5.2.1 text 2.8\*
\var{<array list>}, def 5.2.1\*
\var{<array segment>}, def 5.2.1\*
\var{<assignment statement>}, def 4.2.1 synt 4.1.1 text 1, 4.2.3\*

\var{<basic statement>}, def 4.1.1 synt 4.5.1\*
\var{<basic symbol>}, def 2\*
\keyw{begin}, synt 2.3, 4.1.1\*
\var{<block>}, def 4.1.1 synt 4.5.1 text 1, 4.1.3, 5\*
\var{<block head>}, def 4.1.1\*
\keyw{Boolean}, synt 2.3, 5.1.1 text 5.1.3\*
\var{<Boolean expression>}, def 3.4.1 synt 3, 3.3.1, 4.2.1, 4.5.1, 4.6.1
        text 3.4.3\*
\var{<Boolean factor>}, def 3.4.1\*
\var{<Boolean primary>}, def 3.4.1\*
\var{<Boolean secondary>}, def 3.4.1\*
\var{<Boolean term>}, def 3.4.1\*
\var{<bound pair>}, def 5.2.1\*
\var{<bound pair list>}, def 5.2.1\*
\var{<bracket>}, def 2.3\*

\var{<code>}, synt 5.4.1 text 4.7.8, 5.4.6\*
colon:, synt 2.3, 3.2.1, 4.1.1, 4.5.1, 4.6.1, 4.7.1, 5.2.1\*
colon equal :=, synt 2.3, 4.2.1, 4.6.1, 5.3.1\*
comma , , synt 2.3, 3.1.1, 3.2.1, 4.6.1, 4.7.1, 5.1.1, 5.2.1, 5.3.1, 5.4.1\*
\keyw{comment}, synt 2.3\*
comment convention, text 2.3\*
\var{<compound statement>}, def 4.1.1 synt 4.5.1 text 1\*
\var{<compound tail>}, def 4.1.1\*
\var{<conditional statement>}, def 4.5.1 synt 4.1.1 text 4.5.3\*

\var{<decimal fraction>}, def 2.5.1\*
\var{<decimal number>}, def 2.5.1 text 2.5.3\*
decimal point . , synt 2.3, 2.5.3\*
\var{<declaration>}, def 5 synt 4.1.1 text 1, 5 (complete section)\*
\var{<declarator>}, def 2.3\*
\var{<delimiter>}, def 2.3 synt 2
\var{<designational expression>}, def 3.5.1 synt 3, 4.3.1, 5.3.1 text 3.5.3\*
\var{<digit>}, def 2.2.1 synt 2, 2.4.1, 2.5.1\*
dimension, text 5.2.3.2\*
divide / \mdiv{}, synt 2.3, 3.3.1 text 3.3.4.2\*
\var{<dummy statement>}, def 4.4.1 synt 4.1.1 text 4.4.3\*

\keyw{else}, synt 2.3, 3.3.1, 3.4.1, 3.5.1, 4.5.1 text 4.4.3\*
\var{<empty>}, def 1.1 synt 2.6.1, 3.2.1, 4.4.1, 4.7.1, 5.4.1\*
\keyw{end}, synt 2.3, 4.1.1\*
entier, text 3.2.5\*
exponentiation \mpow{}, synt 2.3, 3.3.1 text 3.3.4.3\*
\var{<expression>}, def 3 synt 3.2.1, 4.7.1 text 3 (complete section)\*
\var{<exponential part>}, def 2.5.1 text 2.5.3\*

\var{<factor>}, def 3.3.1\*
\keyw{false}, synt 2.2.2\*
\var{<for clause>}, def 4.6.1 text 4.6.3\*
\var{<for list>}, def 4.6.1 text 4.6.4\*
\var{<for list element>}, def 4.6.1 text 4.6.4.1, 4.6.4.2, 4.6.4.3\*
\var{<formal parameter>}, def 5.4.1 text 5.4.3\*
\var{<formal parameter list>}, def 5.4.1\*
\var{<formal parameter part>}, def 5.4.1\*
\var{<for statement>}, def 4.6.1 synt 4.1.1, 4.5.1 text 4.6 (complete section)\*
\var{<function designator>}, def 3.2.1 synt 3.3.1, 3.4.1 text 3.2.3, 5.4.4\*

\keyw{goto}, synt 2.3, 4.3.1\*
\var{<go to statement>}, def 3.4.1 synt 4.1.1 text 4.3.3\*

\var{<identifier>}, def 2.4.1 synt 3.1.1, 3.2.1, 3.5.1, 5.4.1 text 2.4.3\*
\var{<identifier list>}, def 5.4.1\*
\keyw{if}, synt 2.3, 3.3.1, 4.5.1\*
\var{<if clause>}, def 3.3.1, 4.5.1 synt 3.4.1, 3.5.1 text 3.3.3, 4.5.3.2\*
\var{<if statement>}, def 4.5.1 text 4.5.3.1\*
\var{<implication>}, def 3.4.1\*
\keyw{integer}, synt 2.3, 5.1.1 text 5.1.3\*
\var{<integer>}, def 2.5.1 text 2.5.4\*

\keyw{label}, synt 2.3, 5.4.1\*
\var{<label>}, def 3.5.1 synt 4.1.1, 4.5.1, 4.6.1 text 1, 4.1.3\*
\var{<left part>}, def 4.2.1\*
\var{<left part list>}, def 4.2.1\*
\var{<letter>}, def 2.1 synt 2, 2.4.1, 3.2.1, 4.7.1\*
\var{<letter string>}, def 3.2.1, 4.7.1\*
local, text 4.1.3\*
\var{<local or own type>}, def 5.1.1 synt 5.2.1\*
\var{<logical operator>}, def 2.3 synt 3.4.1 text 3.4.5\*
\var{<logical value>}, def 2.2.2 synt 2, 3.4.1\*
\var{<lower bound>}, def 5.2.1 text 5.2.4\*

minus -, synt 2.3, 2.5.1, 3.3.1 text 3.3.4.1\*
multiply \mtim{}, synt 2.3, 3.3.1 text 3.3.4.1\*
\var{<multiplying operator>}, def 3.3.1\*

non-local, text 4.1.3\*
\var{<number>}, def 2.5.1 text 2.5.3, 2.5.4\*

\var{<open string>}, def 2.6.1\*
\var{<operator>}, def 2.3\*
\keyw{own}, synt 2.3, 5.1.1 text 5, 5.2.5\*

\var{<parameter delimiter>}, def 3.2.1, 4.7.1 synt 5.4.1 text 4.7.7\*
parentheses (), synt 2.3, 3.2.1, 3.3.1, 3.4.1, 3.5.1, 4.7.1, 5.4.1 text 3.3.5.2\*
plus +, synt 2.3, 2.5.1, 3.3.1 text 3.3.4.1\*
\var{<primary>}, def 3.3.1\*
\keyw{procedure}, synt 2.3, 5.4.1\*
\var{<procedure body>}, def 5.4.1\*
\var{<procedure declaration>}, def 5.4.1 synt 5 text 5.3\*
\var{<procedure heading>}, def 5.4.1 text 5.4.3\*
\var{<procedure identifier>}, def 3.2.1 synt 3.2.1, 4.7.1, 5.4.1 text 4.7.5.4\*
\var{<procedure statement>}, def 4.7.1 synt 4.1.1 text 4.7.3\*
\var{<program>}, def 4.1.1 text 1\*
\var{<proper string>}, def 2.6.1\*

\keyw{real}, synt 2.3, 5.1.1 text 5.1.3\*
\var{<relation>}, def 3.4.1 text 3.4.5\*
\var{<relational operator>}, def 2.3, 3.4.1\*

scope, text 2.7\*
semicolon ; , synt 2.3, 4.1.1, 5.4.1\*
\var{<separator>}, def 2.3\*
\var{<sequential operator>}, def 2.3\*
\var{<simple arithmetic expression>}, def 3.3.1 text 3.3.3\*
\var{<simple Boolean>}, def 3.4.1\*
\var{<simple designational expression>}, def 3.5.1\*
\var{<simple variable>}, def 3.1.1 synt 5.5.1 text 2.4.3\*
space \blank{}, synt 2.3 text 2.3, 2.6.3\*
\var{<specification part>}, def 5.4.1 text 5.4.5\*
\var{<specificator>}, def 2.3\*
\var{<specifier>}, def 5.4.1\*
standard function, text 3.2.4, 3.2.5\*
\var{<statement>}, def 4.1.1 synt 4.5.1, 4.6.1, 5.4.1 text 4 (complete section)\*
statement bracket see \keyw{begin} \keyw{end}\*
\keyw{step}, synt 2.3, 4.6.1 text 4.6.4.2\*
\keyw{string}, synt 2.3, 5.4.1\*
\var{<string>}, def 2.6.1 synt 3.2.1, 4.7.1 text 2.6.3\*
string quotes `', synt 2.3, 2.6.1 text 2.6.3\*
subscript, text 3.1.4.1\*
subscript bound, text 5.2.3.1\*
subscript brackets [], synt 2.3, 3.1.1, 3.5.1, 5.2.1\*
\var{<subscripted variable>}, def 3.1.1 text 3.1.4.1\*
\var{<subscript expression>}, def 3.1.1 synt 3.5.1\*
\var{<subscript list>}, def 3.1.1\*
successor, text 4\*
\keyw{switch}, synt 2.3, 5.3.1, 5.4.1\*
\var{<switch declaration>}, def 5.3.1 synt 5 text 5.3.3\*
\var{<switch designator>}, def 3.5.1 text 3.5.3\*
\var{<switch identifier>}, def 3.5.1 synt 3.2.1, 4.7.1, 5.3.1\*
\var{<switch list>}, def 5.3.1\*

\var{<term>}, def 3.3.1\*
ten \ten{}, synt 2.3, 2.5.1\*
\keyw{then}, synt 2.3, 3.3.1, 4.5.1\*
transfer function, text 3.2.5\*
\keyw{true}, synt 2.2.2\*
\var{<type>}, def 5.1.1 synt 5.4.1 text 2.8\*
\var{<type declaration>}, def 5.1.1 synt 5 text 5.1.3\*
\var{<type list>}, def 5.1.1\*

\var{<unconditional statement>}, def 4.1.1, 4.5.1\*
\var{<unlabelled basic statement>}, def 4.1.1\*
\var{<unlabelled block>}, def 4.1.1\*
\var{<unlabelled compound>}, def 4.1.1\*
\var{<unsigned integer>}, def 2.5.1, 3.5.1\*
\var{<unsigned number>}, def 2.5.1 synt 3.3.1\*
\keyw{until}, synt 2.3, 4.6.1 text 4.6.4.2\*
\var{<upper bound>}, def 5.2.1 text 5.2.4\*

\keyw{value}, synt 2.3, 5.4.1\*
value, text 2.8, 3.3.3\*
\var{<value part>}, def 5.4.1 text 4.7.3.1\*
\var{<variable>}, def 3.1.1 synt 3.3.1, 3.4.1, 4.2.1, 4.6.1 text 3.1.3\*
\var{<variable identifier>}, def 3.1.1\*

\keyw{while}, synt 2.3, 4.6.1 text 4.6.4.3

\sp{4}

\node Note, Description, Index, Description


Note.  This report is published in Numerische Mathematik, in the
Communications of the ACM, and in the Journal of the British Computer
Soc.  Reproduction of this report for any purpose is explicitly
permitted; reference should be made to this issue of Numerische
Mathematik and to the respective issues of the Communications and the
Journal of the British Computer Soc.  as the source. 

\sp{1}

Technical University Delft\*
Delft, Holland\*
W. L. van der Poel,\*
(Chairman of Working Group 2.1 on Algol of the\*
International Federation for Information Processing)


\begin{ifinfo}

\node Editors note, Top, Top, Top

This is a personal note from the Ed. -- still me (schoenfr).

The LaTeX processed Manual contains many symbols, not displayed by
latex-info. Here is the list of these symbols and their representation:

\begin{description}

\item [\ue{}] The u with double dots over em.

\item [\oe{}] The o with double dots over em.

\item [\mfc{}] The french c in Fran\mfc{}aise.

\item [\blank{}] A blank. Printed like a half box.

\item [\ten{}] The ten for the exponent in a real-type number. Printed a
	small lowered ten.

\item [\mpow{}] The power operator: an uparrow.

\item [\mtim{}] The times sign: a cross like an x.

\item [\mdiv{}] The integer division operator: a - with a dot above and
	below.

\item [\mlt{}] Simple: less than.

\item [\mle{}] Simple: less or equal.

\item [\meq{}] Simple: equal.

\item [\mge{}] Simple: greater or equal.

\item [\mgt{}] Simple: greater than.

\item [\mne{}] Simple: not equal.

\item [\mleqv{}] Simple: logical equivalence.

\item [\mlimp{}] Simple: logical implication.

\item [\mlor{}] Simple: logical or.

\item [\mland{}] Simple: logical and.

\item [\mlnot{}] Simple: logical not.

\end{description}

Keywords are enclosed in quotes: \keyw{keyword}.

\end{ifinfo}

\end{document}

\c
\c May be this is ugly - but it works and no extra files are necessary.
\c
\c Local Variables:
\c eval: (put 'ue 'latexinfo-format 'li-format-ue)
\c eval: (defun li-format-ue () (latexinfo-parse-noarg) (insert "ue"))
\c eval: (put 'oe 'latexinfo-format 'li-format-oe)
\c eval: (defun li-format-oe () (latexinfo-parse-noarg) (insert "oe"))
\c eval: (put 'mfc 'latexinfo-format 'li-format-mfc)
\c eval: (defun li-format-mfc () (latexinfo-parse-noarg) (insert "c"))
\c eval: (put 'blank 'latexinfo-format 'li-format-blank)
\c eval: (defun li-format-blank () (latexinfo-parse-noarg) (insert "_"))
\c eval: (put 'ten 'latexinfo-format 'li-format-ten)
\c eval: (defun li-format-ten () (latexinfo-parse-noarg) (insert "'10'"))
\c eval: (put 'mpow 'latexinfo-format 'li-format-mpow)
\c eval: (defun li-format-mpow () (latexinfo-parse-noarg) (insert "^"))
\c eval: (put 'mtim 'latexinfo-format 'li-format-mtim)
\c eval: (defun li-format-mtim () (latexinfo-parse-noarg) (insert "*"))
\c eval: (put 'mdiv 'latexinfo-format 'li-format-mdiv)
\c eval: (defun li-format-mdiv () (latexinfo-parse-noarg) (insert "'div'"))
\c eval: (put 'mlt 'latexinfo-format 'li-format-mlt)
\c eval: (defun li-format-mlt () (latexinfo-parse-noarg) (insert "<"))
\c eval: (put 'mle 'latexinfo-format 'li-format-mle)
\c eval: (defun li-format-mle () (latexinfo-parse-noarg) (insert "<="))
\c eval: (put 'meq 'latexinfo-format 'li-format-meq)
\c eval: (defun li-format-meq () (latexinfo-parse-noarg) (insert "="))
\c eval: (put 'mge 'latexinfo-format 'li-format-mge)
\c eval: (defun li-format-mge () (latexinfo-parse-noarg) (insert ">="))
\c eval: (put 'mgt 'latexinfo-format 'li-format-mgt)
\c eval: (defun li-format-mgt () (latexinfo-parse-noarg) (insert ">"))
\c eval: (put 'mne 'latexinfo-format 'li-format-mne)
\c eval: (defun li-format-mne () (latexinfo-parse-noarg) (insert "!="))
\c eval: (put 'mleqv 'latexinfo-format 'li-format-mleqv)
\c eval: (defun li-format-mleqv () (latexinfo-parse-noarg) (insert "'equiv'"))
\c eval: (put 'mlimp 'latexinfo-format 'li-format-mlimp)
\c eval: (defun li-format-mlimp () (latexinfo-parse-noarg) (insert "'impl'"))
\c eval: (put 'mlor 'latexinfo-format 'li-format-mlor)
\c eval: (defun li-format-mlor () (latexinfo-parse-noarg) (insert "'or'"))
\c eval: (put 'mland 'latexinfo-format 'li-format-mland)
\c eval: (defun li-format-mland () (latexinfo-parse-noarg) (insert "'and'"))
\c eval: (put 'mlnot 'latexinfo-format 'li-format-mlnot)
\c eval: (defun li-format-mlnot () (latexinfo-parse-noarg) (insert "'not'"))
\c eval: (put 'keyw 'latexinfo-format 'li-format-keyw)
\c eval: (defun li-format-keyw () (insert "'" (latexinfo-parse-arg-discard) "'") (goto-char latexinfo-command-start))
\c End:

\c
\c end of RRA60.texinfo
\c
