Local Declaration Guidelines
Local declaration style guidelines for contributing to the Eiffel Software code repository.
Contents
Feature Arguments
Feature arguments should begin with the prefix a_
and nothing more. The prefix a_
represent a contraction of the word argument and does not represent the singular inflection - a noun - Therefore it is not valid to utilize an when the suffixed argument word begins with a vowel. The following is a correct usage:
f (a_string: STRING; a_integer: STRING) ... do end
Here, the second argument a_integer
, is not considered A Integer but The Argument Integer, hence the use if a_
instead of _an_
.
In-line Agent Feature Arguments
When working with an in-line agent, to prevent conflicts with the enclosing feature's arguments, the prefix ia_
should be used. The same rules regarding English language rules apply here as they do to feature arguments. The IA prefix represents an In-line Argument.
f (a_string: STRING; a_integer: STRING) ... do process (agent (ia_string: STRING; ia_integer: INTEGER) do ... end (a_string, a_integer)) end
Local Declarations
l_
In Contracts
Due to the current scoping rules of object-tests
rl_
for require
el_
for ensure
cl_
for check
ll_
for loop
il_
for loop invariant
vl_
for loop variant
Indexing
When a conflict between local delcarations exist a form of indexing must be use
equals (a_object: ANY; a_other_object: ANY): BOOLEAN