Equals ('=') expected
Velox reports this error when a type alias or constant declaration has supplied its name but not the required = separator. In this context = introduces the declared type or constant value; it is not an assignment statement.
Required forms
type
Identifier = TypeDefinition;
const
Identifier = ConstantExpression;
Example
const
MaximumRetries := 3; // Error: Equals ('=') expected
Use = in the declaration:
const
MaximumRetries = 3;
Runtime storage still uses :=:
RetryCount := MaximumRetries;
How Velox detects it
The modified PascalScript compiler emits the internal error enum ecIsExpected after reading a name in a type or const block when the next token is not =. Velox overrides the public message text to Equals ('=') expected and displays it as an Error.
The internal enum name is an implementation detail and does not mean the script should contain the word is. The required source token is exactly =.
Distinguishing the operators
Name = Valuein aconstblock defines a compile-time constant.Name = TypeDefinitionin atypeblock defines a type.Target := Expressionin executable code stores a runtime value.Left = Rightinside an expression compares two values and produces a Boolean.
The token has to be interpreted from its surrounding grammar, not from its English meaning.
Correction procedure
- Find the owning
typeorconstblock. - Confirm that the declaration has a valid identifier before the separator.
- Replace
:=or an omitted token with=. - Ensure the right side is a valid type definition or compile-time constant expression, not an executable statement.
- Check the preceding declaration for a missing semicolon if the visible line already uses
=.
Common causes
- Using assignment syntax in a constant declaration.
- Writing a C-style type declaration.
- Omitting the separator during an edit.
- Missing the previous semicolon, causing the next identifier to be parsed in the wrong declaration.
- Assuming the message requests an equality comparison in executable code.
Related reference
Assignment (':=') expected— the executable storage operator.Constants— values registered or declared for scripts.Types— type aliases and exposed type definitions.