Incremental correction

If the translator is of the opinion that a specific symbol was omitted or if it expects a specific syntactic construction (identifier; attribute VAR or CONST; unit or declaration ...) it gives an error message to that effect in the lower left corner of the screen and offers the directly surrounding definition for local editing. The cursor is positioned at the place of the supposed error. As an example, suppose the user types as a unit


\begin{elan}
ROW INT VOR a
\end{elan}

The translator complains Number of elements ? and offers


\begin{elan}
ROW \cursor INT VOR a
\end{elan}

The user dutifully inserts 10 and hits the return key. The translator now complains VAR/CONST ? and offers


\begin{elan}
ROW 10 INT \cursor VOR a
\end{elan}

The user changes VOR into VAR and hits the return key <RET>, whereupon the translator accepts the rest of the line in silence and waits for the next line. This same incremental correction facility is available for correcting input during reading from a file.

As the Elan Programming Environments does not impose restrictions on the order of the definitions and the user might introduce all kinds of weird operators, like THAN, situations can occur in which the error signalling is not so helpful. For example, if the user types


\begin{elan}
IF a>=0 THAN a ELSE -a FI
\end{elan}

the Elan Programming Environment will now complain THEN ? and offer


\begin{elan}
IF a>=0 THAN a \cursor ELSE -a FI
\end{elan}

apparently considering THAN to be meant as an operator and so interpreting this construction as


\begin{elan}
IF a >= (0 THAN a) ELSE -a FI
\end{elan}

The error reported on the bottom line of the screen should be seen as just a suggestion! It is the best the programming environment can do, but it is up to the user to decide what it was he wanted to express and how to repair the error.