Eiffel programming language reserved words
- Contents
- Reserved words
- across
- agent
- alias
- all
- and
- as
- assign
- attribute
- check
- class
- convert
- create
- Current
- debug
- deferred
- do
- else
- elseif
- end
- ensure
- expanded
- export
- external
- False
- feature
- from
- frozen
- if
- implies
- inherit
- inspect
- invariant
- like
- local
- loop
- not
- note
- obsolete
- old
- once
- only
- or
- Precursor
- redefine
- rename
- require
- rescue
- Result
- retry
- select
- separate
- then
- True
- TUPLE
- undefine
- until
- variant
- Void
- when
- xor
In the Eiffel programming language, there are certain words that are considered "reserved". These words have specific meanings recognized by the compiler. As such, it is invalid to attempt to use a reserved word as an ordinary language identifier.
The reserved words listed in the ISO/ECMA standard are shown below with a brief explanation of their meanings. Links are given where appropriate to the syntax definitions and to descriptions in the online documentation. Occasionally, references to the June 2006 standard document are used and are recognizable as clause numbers in parentheses, i.e., three integers separated by dots, for example: (8.14.1)
Reserved words
across
Introduces an iteration.
agent
Used to specify an agent.
alias
Used to identify an alternative or alias feature name.
Usage for infix/prefix notations.
Usage in interfaces to external software.
all
Used in export adaptation to indicate that a chosen export status applies to all features inherited from a given parent.
and
The logical conjunction operator. Strict when used alone, nonstrict when used with then.
as
Used when renaming features in descendant classes.
assign
Used to designate assigner commands.
attribute
Introduces an attribute body, as in self-initializing attributes.
check
Identifies a check instruction.
class
Used in a class header in the declaration of a class.
convert
Used in converter clauses.
Used in feature names for operator aliases, supporting mixed type expressions causing a conversion of the target (8.5.14).
create
In the creators part of a class, introduces those procedures which can be used to initialize instances.
Introduces a creation instruction.
Introduces a creation expression (8.20.18)
In constrained genericity, introduces a list of names of features which can be used as creation procedures with a generic class for a particular formal generic parameter. (8.12.10)
Current
A predefined entity indicating the current object.
debug
Introduces a debug instruction.
deferred
Used in class header to indicate a deferred class.
Used in routine body to indicate a deferred feature.
do
Introduces a sequence of instructions as a routine body, as shown in the Hello World example.
else
Used in conditional and multi-branch instructions to introduce a sequence of instructions to be executed in the case that no specified conditions are met.
Used in a conditional expression to compute a value in the case that no specified conditions are met.
Used as part of the double reserved word or else
, the semi-strict disjunction operator.
Used after the reserved word require
as a precondition extension, allowing the weakening of an inherited precondition (8.10.3).
elseif
Used in conditional instructions to effect a "multi-branch" choice instruction.
Used in a conditional expression to effect a "multi-branch" choice to compute of a value.
end
Serves to terminate several Eiffel programming language constructs.
Syntax for:
ensure
Introduces a postcondition.
When followed by the reserved word then
denotes a postcondition extension, allowing the strengthening of an inherited postcondition (8.10.3).
expanded
Used in a class header to indicate that a class is expanded.
export
Used to change the export status (availability to clients) of inherited features.
external
Denotes an external routine. External routines are commonly defined to interface with C external routines and C++ external routines.
False
Boolean manifest constant.
feature
Introduces a feature clause.
from
Used in loop initialization.
frozen
Used in a class header to mark a class explicitly as frozen. A frozen class prohibits it from serving as a "conforming parent" to other classes. (8.4.5).
Used in a feature declaration to mark a feature as frozen. A frozen feature cannot be redefined by heir classes.
Used with a formal generic parameter to indicate that conformance of generic derivations of the class require identical actual generic parameters. (8.12.3)
if
Used to introduce a conditional.
Used to introduce a Conditional expression.
implies
The semi-strict logical implication operator.
inherit
Used in an inherit clause.
inspect
Introduces a multi-branch instruction.
invariant
Used to introduce an invariant assertion as a class invariant or loop invariant.
like
Used in the declaration of an anchored entity.
local
Introduces the local variable declarations in a feature body.
loop
Introduces a loop body.
not
The logical negation operator.
note
Used to begin a Notes part, in a class declaration, a feature declaration, or a check instruction.
obsolete
Used to mark obsolete features and classes.
old
Introduces an old expression. Old expressions are valid only in the postconditions of routines.
once
Used to introduce once routines and once string expressions.
only
Used in an only postcondition clause. (8.9.11)
or
The logical disjunction operator. Strict when used alone, nonstrict when used with else.
Precursor
Allows a redefined routine to access the routine it redefines, i.e, its precursor.
redefine
Used in an inheritance part of a class declaration to list those inherited features which, in the heir class, will receive new implementations, specifications, or both, i.e, those features being redefined.
rename
Used in an inheritance part of a class declaration to provide alternative names for inherited features in an heir class.
Used to rename features in a generic constraint. (8.12.8).
require
Introduces a precondition.
When followed by the reserved word else
denotes a precondition extension, allowing the weakening of an inherited precondition (8.10.3).
rescue
Introduces a rescue clause in a feature body.
Result
A predefined entity used to represent the final result of a function.
retry
An instruction valid only in rescue clauses and used to re-execute the routine in which it appears.
select
Used in an inheritance part of a class declaration to resolve possible ambiguities related to polymorphism and dynamic binding in the presence of repeated inheritance.
separate
Used to support Concurrent programming with SCOOP.
then
Used in conditional and multi-branch instructions to introduce a sequence of instructions to be executed in the case that a condition is met.
Used in a conditional expression to compute of a value in the case that a condition is met.
Used as part of the double reserved word and then
, the semi-strict conjunction operator.
Used after the reserved word ensure
as a postcondition extension, allowing the strengthening of an inherited postcondition (8.10.3).
True
Boolean manifest constant.
TUPLE
Denotes a TUPLE type.
undefine
Used in an inheritance part of a class declaration to uneffect an inherited feature.
until
Used in loop initialization.
variant
Introduces a loop variant.
Void
A predefined entity name representing a void (a.k.a., null) reference.
when
Used in a multi-branch instruction to introduce cases.
xor
The exclusive disjunction operator.