mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
Author:admin
Date:2014-06-04T21:36:00.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1375 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -4,11 +4,11 @@
|
|||||||
==Kernel classes==
|
==Kernel classes==
|
||||||
{| class="doctable"
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Fictitious class for tuples
|
| Fictitious class for tuples
|
||||||
| <eiffel>TUPLE</eiffel>
|
| <eiffel>TUPLE</eiffel>
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Features==
|
==Features==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Prefix and infix feature names
|
| Prefix and infix feature names
|
||||||
| <code>infix "+"</code>
|
| <code>infix "+"</code>
|
||||||
@@ -36,7 +36,8 @@
|
|||||||
| <code>add alias "+"</code>
|
| <code>add alias "+"</code>
|
||||||
| No
|
| No
|
||||||
| Yes
|
| Yes
|
||||||
| Yes, except for new rules for free operator names
|
| Yes, except for new rules
|
||||||
|
for free operator names
|
||||||
|-
|
|-
|
||||||
| Assigner command
|
| Assigner command
|
||||||
| <code>item alias "[]" (index: INTEGER): G assign put</code>
|
| <code>item alias "[]" (index: INTEGER): G assign put</code>
|
||||||
@@ -46,13 +47,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Design by Contract==
|
==Design by Contract==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Only postcondition clauses
|
| Only postcondition clauses
|
||||||
| <eiffel>ensure only a, b</eiffel>
|
| <eiffel>ensure only a, b</eiffel>
|
||||||
@@ -62,13 +63,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Genericity==
|
==Genericity==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Mutually recursive constraints
|
| Mutually recursive constraints
|
||||||
| <code>A [H, G -> H]</code><br/>
|
| <code>A [H, G -> H]</code><br/>
|
||||||
@@ -93,15 +94,16 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Creating objects==
|
==Creating objects==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Implicit creation procedure (version of <code>ANY.default_create</code>)
|
| Implicit creation procedure (version of
|
||||||
|
<code>ANY.default_create</code>)
|
||||||
| <code>class A feature ... end</code><br/>
|
| <code>class A feature ... end</code><br/>
|
||||||
<code>-- The following instructions are equivalent:</code><br/>
|
<code>-- The following instructions are equivalent:</code><br/>
|
||||||
<code>create {A} a</code><br/>
|
<code>create {A} a</code><br/>
|
||||||
@@ -142,19 +144,25 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Attachment==
|
==Attachment==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Preserving expandedness status when attaching expanded object to reference entity
|
| Preserving expandedness status
|
||||||
|
when attaching expanded object
|
||||||
|
to reference entity
|
||||||
| <code>x</code> <code>:=</code> <code>y</code>
|
| <code>x</code> <code>:=</code> <code>y</code>
|
||||||
| No, object is copied to new object of the corresponding reference type
|
| No, object is copied to new
|
||||||
|
object of the corresponding
|
||||||
|
reference type
|
||||||
| Yes
|
| Yes
|
||||||
| Yes, except for TYPED_POINTER that is converted to POINTER before reattachment
|
| Yes, except for TYPED_POINTER
|
||||||
|
that is converted to POINTER before
|
||||||
|
reattachment
|
||||||
|-
|
|-
|
||||||
| Reverse assignment (assignment attempt)
|
| Reverse assignment (assignment attempt)
|
||||||
| <code>x</code> <code>?=</code> <code>y</code>
|
| <code>x</code> <code>?=</code> <code>y</code>
|
||||||
@@ -164,13 +172,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Feature calls==
|
==Feature calls==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Precursor call
|
| Precursor call
|
||||||
| <code>Precursor</code>
|
| <code>Precursor</code>
|
||||||
@@ -198,13 +206,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Void-safety==
|
==Void-safety==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Attachment marks
|
| Attachment marks
|
||||||
| <code>a: attached ANY</code> <br/>
|
| <code>a: attached ANY</code> <br/>
|
||||||
@@ -234,13 +242,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==[[Concurrent Eiffel with SCOOP|SCOOP]]==
|
==[[Concurrent Eiffel with SCOOP|SCOOP]]==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| width="160pt"| <center>'''Example'''</center>
|
! width="160pt"| <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Separate declaration
|
| Separate declaration
|
||||||
| <code> a: separate ANY </code>
|
| <code> a: separate ANY </code>
|
||||||
@@ -250,13 +258,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Expressions==
|
==Expressions==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Bracket expression
|
| Bracket expression
|
||||||
| <code>y := x [i]</code>
|
| <code>y := x [i]</code>
|
||||||
@@ -296,13 +304,13 @@
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Constants==
|
==Constants==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''Example'''</center>
|
! <center>'''Example'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Verbatim string
|
| Verbatim string
|
||||||
|
|
|
|
||||||
@@ -337,12 +345,12 @@ y := "{
|
|||||||
|}
|
|}
|
||||||
|
|
||||||
==Interfacing with external software==
|
==Interfacing with external software==
|
||||||
{|
|
{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| <center>'''Feature'''</center>
|
! <center>'''Feature'''</center>
|
||||||
| <center>'''ETL2'''</center>
|
! <center>'''ETL2'''</center>
|
||||||
| <center>'''ECMA-367'''</center>
|
! <center>'''ECMA-367'''</center>
|
||||||
| <center>'''EiffelStudio'''</center>
|
! <center>'''EiffelStudio'''</center>
|
||||||
|-
|
|-
|
||||||
| Access to software written in C
|
| Access to software written in C
|
||||||
| Basic syntax for any external software
|
| Basic syntax for any external software
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
[[Property:weight|0]]
|
[[Property:weight|0]]
|
||||||
[[Property:uuid|d98b7fb8-37a1-05b3-a58f-baacefd5dce6]]
|
[[Property:uuid|d98b7fb8-37a1-05b3-a58f-baacefd5dce6]]
|
||||||
__NOTOC__
|
__NOTOC__
|
||||||
:{|
|
=Description=
|
||||||
|
Assigning a variable to itself is a meaningless instruction due to a typing error. Most probably, one of the two variable names was misspelled. One example among many others: the programmer wanted to assign a local variable to a class attribute and used one of the variable names twice.
|
||||||
|
:{| class="doctable"
|
||||||
|-
|
|-
|
||||||
| '''Scope'''
|
| '''Scope'''
|
||||||
| Instruction
|
| Instruction
|
||||||
@@ -21,9 +23,6 @@ __NOTOC__
|
|||||||
| 70
|
| 70
|
||||||
|}
|
|}
|
||||||
|
|
||||||
=Description=
|
|
||||||
Assigning a variable to itself is a meaningless instruction due to a typing error. Most probably, one of the two variable names was misspelled. One example among many others: the programmer wanted to assign a local variable to a class attribute and used one of the variable names twice.
|
|
||||||
|
|
||||||
=Example=
|
=Example=
|
||||||
<e>a := a
|
<e>a := a
|
||||||
</e>
|
</e>
|
||||||
|
|||||||
@@ -3,7 +3,12 @@
|
|||||||
[[Property:weight|0]]
|
[[Property:weight|0]]
|
||||||
[[Property:uuid|02a649b3-0e4e-6fdf-388d-c411a06fc787]]
|
[[Property:uuid|02a649b3-0e4e-6fdf-388d-c411a06fc787]]
|
||||||
__NOTOC__
|
__NOTOC__
|
||||||
:{| class="wikitable"
|
=Description=
|
||||||
|
An expression comparing a variable to itself always evaluates to the same boolean value. The comparison is thus redundant. In an Until expression it may lead to non-termination. Usually it is a typing error.
|
||||||
|
:{| class="doctable"
|
||||||
|
|-
|
||||||
|
! Property
|
||||||
|
! Value
|
||||||
|-
|
|-
|
||||||
| '''Scope'''
|
| '''Scope'''
|
||||||
| Instruction
|
| Instruction
|
||||||
@@ -21,9 +26,6 @@ __NOTOC__
|
|||||||
| 70
|
| 70
|
||||||
|}
|
|}
|
||||||
|
|
||||||
=Description=
|
|
||||||
An expression comparing a variable to itself always evaluates to the same boolean value. The comparison is thus redundant. In an Until expression it may lead to non-termination. Usually it is a typing error.
|
|
||||||
|
|
||||||
=Example=
|
=Example=
|
||||||
<e>if a >= a then
|
<e>if a >= a then
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -2,5 +2,8 @@
|
|||||||
[[Property:link_title|Rules]]
|
[[Property:link_title|Rules]]
|
||||||
[[Property:weight|15]]
|
[[Property:weight|15]]
|
||||||
[[Property:uuid|109ca62a-212d-8a85-eea8-ddf0f89177a1]]
|
[[Property:uuid|109ca62a-212d-8a85-eea8-ddf0f89177a1]]
|
||||||
|
For each rules, you will find an English description of the purpose of the rule, followed by a table providing the following information:
|
||||||
|
* scope:
|
||||||
|
* status: Enabled/Disabled by default
|
||||||
|
*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user