Local Declaration Guidelines

Revision as of 17:26, 24 December 2008 by Paulb (Talk | contribs) (New page: {{UnderConstruction}} Category:Coding Style Guidelines Local declaration style guidelines for contributing to the Eiffel Software code repository. == Feature Arguments == Feature arg...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Construction.png Not Ready for Review: This Page is Under Development!

Local declaration style guidelines for contributing to the Eiffel Software code repository.

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)
    ....

Here, the second argument a_integer, is not considered A Integer but The Argument Integer.

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.

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