Error Messages/42699

< Error Messages
Revision as of 14:17, 17 April 2026 by Lchrisman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Error Message

Syntax error:
End is not allowed in an expression.

more generally,

«keyword» is not allowed in an expression.

Description

An example where this occurs:

Begin
   Local x:=1;
End
x

In this example, Local expects a body expression after the semi-colon, but instead encounters an unexpected keyword, End, resulting in this syntax error.

Presumably the intended phrasing in this example would have been

Begin
   Local x:=1;
   x
End

The Begin-End here isn't doing anything if this is the entire expression, but this might be extracted from a larger expression.

Comments


You are not allowed to post comments.