mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
Author:halw
Date:2010-05-07T21:03:51.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@583 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
[[Property:uuid|af3a030c-2970-2e07-7bd4-9e9333a8a8c3]]
|
||||
To modify the assertion level in a generated binary (executable or library),
|
||||
* Open the [[Assertion Options|Project Settings]] dialog.
|
||||
* In the '''Target, Assertions'''section, select the assertions you want to check (among require, ensure, check, loop and class invariant).
|
||||
* In the '''Target --> Assertions''' section, set a value of "True" for the assertion types you want to have checked at runtime (among require, ensure, check, loop and class invariant).
|
||||
* Click '''OK'''.
|
||||
* You must [[Generating executables|recompile]] your project for the changes to take effect.
|
||||
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
[[Property:title|Setting the syntax variant]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|e265de3f-ea49-3062-ff0c-f1c296748d3e]]
|
||||
The design of Eiffel the language has remained largely static over its life, arguably due to its sound initial design. Still, on occasion there is value in evolving and adapting to new challenges. To accommodate this evolution, the Eiffel Software compiler provides a set of compilation variants which offer a balance of syntax support. This starts with compatibility with previously valid syntax, moves through the latest standard, and forward to language features which are supported but not yet etched into the standard.
|
||||
The specification of Eiffel the language has remained largely static over its life, arguably due to its sound initial design. Still, on occasion there will be significant value in evolving Eiffel and adapting it to new challenges. To accommodate this evolution, the Eiffel Software compiler provides a set of compilation variants which offer a balance of syntax support. This starts with compatibility with previously valid syntax, moves through the latest standard, and forward to language features which are currently supported but not yet etched into the standard.
|
||||
|
||||
EiffelStudio project settings supports four of these syntax compilation variants:
|
||||
|
||||
# '''Obsolete syntax'''
|
||||
# '''Transitional syntax'''
|
||||
# '''Standard syntax'''
|
||||
# '''Provisional syntax'''
|
||||
|
||||
|
||||
Because the language, and by necessity the compilation technology too, may be a moving target, it is difficult to give precise definitions of what these variants mean at any given time. Today's valid identifier is tomorrow's keyword and vice versa. Even so, we can use an example from a particular point in time to show the basic idea.
|
||||
|
||||
At one time, the word '''indexing''' was a keyword, and the word '''note''' was available for use as a valid identifier. But there came a time that due to a consensus of opinion within the Eiffel standards committee, the role of the keyword <code>indexing</code> was replaced by a new keyword <code>note</code>. This meant two things. First that if you had used the keyword <code>indexing</code> in your classes (and who hadn't?), then at some point you would want to change those occurrences to <code>note</code>. Second, if you had used the word '''note''' as an identifier, then at some point you would have to change your code to use a different identifier it its place.
|
||||
|
||||
The Eiffel compiler is savvy enough in some cases to delay the necessity of these changes by considering code in its current context. For example, if a particular keyword is not appropriate in a certain context, then it is only reasonable that when the word is used in that context, it is used as an identifier. But sometimes ambiguities arise that the compiler cannot resolve by analyzing context. It is in these cases that the syntax variants are useful.
|
||||
|
||||
So, considering the transition from '''indexing''' to '''note''', here are the effects of the first three variants:
|
||||
|
||||
:If '''Obsolete syntax''' is selected, then '''indexing''' is used as a keyword. '''note''' is allowed as an identifier, but with the warning that it will become a keyword in the future.
|
||||
|
||||
:If '''Transitional syntax''' is selected, both '''indexing''' and '''note''' are recognized as keywords, and a warning is issued that '''indexing''' is an obsolete keyword and should be replaced with '''note'''.
|
||||
|
||||
:If '''Standard syntax''' is selected, then '''indexing''' is free to be used as an identifier, and '''note''' is recognized as a keyword.
|
||||
|
||||
When '''Provisional syntax''' is selected, it allows the inclusion of certain language constructs which, although supported by the Eiffel Software compiler, may not yet be stamped into the standard. For example, version 6.6 of EiffelStudio includes support for the [[ET: Instructions#A closer look at the iteration form|iteration form]] of the Eiffel loop construct, which at the time of the release is not in the current standard ... although it is expected, with reasonable confidence, to become standard in the future. Of course, there is always the risk that, once standardized, the syntax may change some, so selecting '''Provisional syntax''' is an acknowledgment that non-standard language elements are being used.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user