mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
merge changed from 18.11 into trunk.
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2151 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Fri, 04 Jan 2019 15:06:26 GMT]]
|
||||
[[Property:publication_date|Thu, 03 Jan 2019 18:00:43 GMT]]
|
||||
[[Property:uuid|146E241E-C367-4F16-9CCE-6F11E5F7860A]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:title|Eiffel Code Comments]]
|
||||
@@ -8,22 +10,31 @@ The Eiffel compiler and EiffelStudio's code browsing tools support a special, li
|
||||
===Syntax===
|
||||
The syntax for marking up classes and features is very compact, to ensure retained legibility. You'll see no need for XML or other types of verbose mark up found in other languages, which can impede the comment's very nature as a quick reference.
|
||||
|
||||
To mark up a class reference, surround the class name in an open ('''{''') and matching closing ('''}''') brace:
|
||||
To mark up a class reference, surround the class name in an open (` { `) and matching closing (` } `) brace:
|
||||
|
||||
<e>
|
||||
-- See {DEBUG_OUTPUT} for more information.
|
||||
-- See {DEBUG_OUTPUT} for more information.
|
||||
</e>
|
||||
|
||||
To mark up a feature reference, implemented in the same class or parent, surround the feature name in a single back quote (`) and a matching closing single quote ('):
|
||||
To mark up a feature reference, implemented in the same class or parent, surround the name with two single back quotes (`` `...` ``):
|
||||
|
||||
<e>
|
||||
-- See `debug_output' for more information.
|
||||
-- See `debug_output` for more information.
|
||||
</e>
|
||||
|
||||
The earlier convention, which you will still find in much existing code, used a single back quote for opening and a matching normal quote for closing, as in
|
||||
|
||||
<e>
|
||||
-- See `debug_output' for more information.
|
||||
</e>
|
||||
|
||||
The new convention, with back quotes both for opening and for closing, is the recommended one.
|
||||
|
||||
|
||||
In the case where a reference to a feature is not accessible to the containing class directly, use a combination of the class reference mark up and a feature name, ''sans'' quotation marks:
|
||||
|
||||
<e>
|
||||
-- See {DEBUG_OUTPUT}.debug_output for more information.
|
||||
-- See {DEBUG_OUTPUT}.debug_output for more information.
|
||||
</e>
|
||||
|
||||
The rules that apply for comments, as described above, can also be utilized in any manifest or verbatim string:
|
||||
@@ -49,8 +60,8 @@ feature -- Query
|
||||
test (a_arg: INTEGER): BOOLEAN
|
||||
-- Comments for a feature.
|
||||
--
|
||||
-- `a_arg': An integer value.
|
||||
-- `Result': Could be True or False.
|
||||
-- `a_arg`: An integer value.
|
||||
-- `Result`: Could be True or False.
|
||||
deferred
|
||||
end
|
||||
|
||||
@@ -99,8 +110,8 @@ Using the code browsing facilities of [[EiffelStudio]] the reader will be presen
|
||||
--
|
||||
-- Comments for a feature.
|
||||
--
|
||||
-- `a_arg': An integer value.
|
||||
-- `Result': Could be True or False.
|
||||
-- `a_arg`: An integer value.
|
||||
-- `Result`: Could be True or False.
|
||||
--
|
||||
-- Some additional comments.
|
||||
</e>
|
||||
@@ -111,8 +122,8 @@ For clarity it is a good idea to separate the agumented comments from the precur
|
||||
-- Comments before the original comments from {BASE}.
|
||||
-- Comments for a feature.
|
||||
--
|
||||
-- `a_arg': An integer value.
|
||||
-- `Result': Could be True or False.
|
||||
-- `a_arg`: An integer value.
|
||||
-- `Result`: Could be True or False.
|
||||
-- Some additional comments.
|
||||
</e>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Tue, 30 Apr 2019 07:27:55 GMT]]
|
||||
[[Property:publication_date|Mon, 29 Apr 2019 14:08:51 GMT]]
|
||||
[[Property:title|Eiffel programming language syntax]]
|
||||
[[Property:link_title|Syntax]]
|
||||
[[Property:weight|0]]
|
||||
@@ -98,7 +100,12 @@ A simple string -- specimen of Simple_string -- is a [[#Strings|String]] consist
|
||||
| } || %> || Closing brace
|
||||
|}
|
||||
|
||||
* %/123/ represents the character with decimal code 123 .
|
||||
* `%/123/` represents the character with decimal code `123` .
|
||||
* And only for manifest character (for now)
|
||||
** `'%/0x2200/'` represents the character with hexadecimal code U+2200 = '∀' (note `'%/0x2200/' = '%/8704/'` )
|
||||
** `'%/0c21000/'` in octal
|
||||
** `'%/0b10001000000000/'` in binary
|
||||
|
||||
|
||||
===Line wrapping parts===
|
||||
|
||||
|
||||
@@ -1,54 +1,58 @@
|
||||
[[Property:title|Learning Eiffel]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|a30e29fe-841d-4634-ded2-88ae1754e5fd]]
|
||||
If you are new to Eiffel and are interested in learning the technology, you might consider some of the following resources. Remember that Eiffel, unlike other programming languages, is not just a programming language. Instead, it is a full life-cycle framework for software development. As a consequence, learning Eiffel implies learning the Eiffel Method and the Eiffel programming Language. Additionally, the Eiffel development environment EiffelStudio is specifically designed to support the method and language. So having an understanding of the method and language helps you to appreciate the capabilities and behavior of EiffelStudio.
|
||||
|
||||
|
||||
=Online presentations=
|
||||
|
||||
Your first stop in getting acquainted with Eiffel might be the collection of [http://eiffel.com/developers/presentations/ online presentations] on the [http://eiffel.com eiffel.com] website. These presentations each usually take less than an hour to view, and give an introduction to Eiffel concepts including Design by Contract, the EiffelStudio development environment, and includes several presentations that describe selected Eiffel features in relation to those of other other development tools.
|
||||
|
||||
=Online documentation set=
|
||||
|
||||
The [http://docs.eiffel.com docs.eiffel.com] site contains the online documentation for the Eiffel method, tools, and language. Within the documentation set are tutorials to help you learn about the Eiffel programming language and tools.
|
||||
|
||||
==The Eiffel Tutorial==
|
||||
|
||||
A [[An Eiffel Tutorial (ET)|tutorial]] that covers the Eiffel Method and much of the Eiffel programming language.
|
||||
|
||||
==The EiffelStudio Guided Tour==
|
||||
|
||||
This [[Introducing EiffelStudio]] page is good way to get a feel for what EiffelStudio can do.
|
||||
|
||||
=Academic materials available online=
|
||||
|
||||
Many colleges and universities use Eiffel to teach "best practices" in software engineering. Often the materials used in courses are available on the worldwide web. For example, the teaching materials for courses at the Swiss Federal Institute of Technology in Zurich are available at [http://se.ethz.ch/teaching/index.html this web address].
|
||||
|
||||
If you search the web, you can find similar materials at other academic institutions.
|
||||
|
||||
=Learning maps=
|
||||
|
||||
For certain specific areas of learning, the eiffel.com website includes conceptual [http://eiffel.com/developers/learning_maps/ learning maps]. These are graphical maps that link concepts with their relationships. Each concept can have multiple learning resources attached to it. One of the most prevalent types of resources is the "Learnlet", a short online presentation (less than 30 minutes) covering a specific concept.
|
||||
|
||||
=Books=
|
||||
|
||||
To find information about the most up-to-date books about Eiffel, look [[Books about the Eiffel Method and Language|here]].
|
||||
|
||||
=Examples and sample code=
|
||||
|
||||
Throughout the documentation site, there are many code snippets designed to illustrate certain language features or design principles. For example, the code snippet [[ET: Inheritance#Redefinition|here]] shows the mechanics of redefining an inherited feature.
|
||||
|
||||
In the EiffelStudio distribution you will find a subdirectory "<code>examples</code>" which contains many examples of using Eiffel, primarily with the Eiffel class libraries.
|
||||
|
||||
A third source of examples is the [[Examples]] book in the documentation pages.
|
||||
|
||||
=Eiffel Programming Language Syntax=
|
||||
|
||||
The documentation site includes a summary of the [[Quick reference to the Eiffel programming language|syntax of Eiffel]] the language. This summary is intended to reflect the state of the current official [[ECMA Standard 367|ISO/ECMA Eiffel standard document]].
|
||||
|
||||
However, usually you will find that there are differences in the syntax supported by EiffelStudio's compiler and that defined in the current standard. The differences between the standard and the EiffelStudio implementation are summarized in the [[EiffelStudio release notes]] and in a [[Differences between standard ECMA-367 and Eiffel Software implementation|documentation page]] that is specific to that purpose.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[[Property:modification_date|Fri, 22 Mar 2019 14:53:52 GMT]]
|
||||
[[Property:publication_date|Fri, 22 Mar 2019 14:53:52 GMT]]
|
||||
[[Property:title|Learning Eiffel]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|a30e29fe-841d-4634-ded2-88ae1754e5fd]]
|
||||
If you are new to Eiffel and are interested in learning the technology, you might consider some of the following resources. Remember that Eiffel, unlike other programming languages, is not just a programming language. Instead, it is a full life-cycle framework for software development. As a consequence, learning Eiffel implies learning the Eiffel Method and the Eiffel programming Language. Additionally, the Eiffel development environment EiffelStudio is specifically designed to support the method and language. So having an understanding of the method and language helps you to appreciate the capabilities and behavior of EiffelStudio.
|
||||
|
||||
|
||||
=Online presentations=
|
||||
|
||||
Your first stop in getting acquainted with Eiffel might be the collection of [http://eiffel.com/developers/presentations/ online presentations] on the [http://eiffel.com eiffel.com] website. These presentations each usually take less than an hour to view, and give an introduction to Eiffel concepts including Design by Contract, the EiffelStudio development environment, and includes several presentations that describe selected Eiffel features in relation to those of other other development tools.
|
||||
|
||||
=Online documentation set=
|
||||
|
||||
The [http://docs.eiffel.com docs.eiffel.com] site contains the online documentation for the Eiffel method, tools, and language. Within the documentation set are tutorials to help you learn about the Eiffel programming language and tools.
|
||||
|
||||
==The Eiffel Tutorial==
|
||||
|
||||
A [[An Eiffel Tutorial (ET)|tutorial]] that covers the Eiffel Method and much of the Eiffel programming language.
|
||||
|
||||
==The EiffelStudio Guided Tour==
|
||||
|
||||
This [[Introducing EiffelStudio]] page is good way to get a feel for what EiffelStudio can do.
|
||||
|
||||
=Academic materials available online=
|
||||
|
||||
Many colleges and universities use Eiffel to teach "best practices" in software engineering. Often the materials used in courses are available on the worldwide web. For example, the teaching materials for courses at the Swiss Federal Institute of Technology in Zurich are available at [http://se.inf.ethz.ch/courses/ this web address] (warning: old content).
|
||||
|
||||
If you search the web, you can find similar materials at other academic institutions.
|
||||
|
||||
<!--
|
||||
=Learning maps=
|
||||
|
||||
For certain specific areas of learning, the eiffel.com website includes conceptual [http://eiffel.com/developers/learning_maps/ learning maps]. These are graphical maps that link concepts with their relationships. Each concept can have multiple learning resources attached to it. One of the most prevalent types of resources is the "Learnlet", a short online presentation (less than 30 minutes) covering a specific concept.
|
||||
-->
|
||||
|
||||
=Books=
|
||||
|
||||
To find information about the most up-to-date books about Eiffel, look [[Books about the Eiffel Method and Language|here]].
|
||||
|
||||
=Examples and sample code=
|
||||
|
||||
Throughout the documentation site, there are many code snippets designed to illustrate certain language features or design principles. For example, the code snippet [[ET: Inheritance#Redefinition|here]] shows the mechanics of redefining an inherited feature.
|
||||
|
||||
In the EiffelStudio distribution you will find a subdirectory "<code>examples</code>" which contains many examples of using Eiffel, primarily with the Eiffel class libraries.
|
||||
|
||||
A third source of examples is the [[Examples]] book in the documentation pages.
|
||||
|
||||
=Eiffel Programming Language Syntax=
|
||||
|
||||
The documentation site includes a summary of the [[Quick reference to the Eiffel programming language|syntax of Eiffel]] the language. This summary is intended to reflect the state of the current official [[ECMA Standard 367|ISO/ECMA Eiffel standard document]].
|
||||
|
||||
However, usually you will find that there are differences in the syntax supported by EiffelStudio's compiler and that defined in the current standard. The differences between the standard and the EiffelStudio implementation are summarized in the [[EiffelStudio release notes]] and in a [[Differences between standard ECMA-367 and Eiffel Software implementation|documentation page]] that is specific to that purpose.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Thu, 06 Sep 2018 15:21:39 GMT]]
|
||||
[[Property:modification_date|Wed, 17 Apr 2019 14:09:18 GMT]]
|
||||
[[Property:publication_date|Thu, 06 Sep 2018 15:17:57 GMT]]
|
||||
[[Property:uuid|96077603-DD2D-4D8C-A486-AF4BD066613A]]
|
||||
[[Property:weight|2000]]
|
||||
@@ -18,7 +18,7 @@ The `across` can be used on every `ITERABLE` object (including `LIST` objects).
|
||||
end
|
||||
</code>
|
||||
|
||||
Note that the temporary variable (`ic` in the example) represent an iterator of the `ITERABLE` object, and not directly an element like in many other languages (like the `for` structure in Python for example).
|
||||
Note that the temporary variable (`ic` in the example) represents an iterator of the `ITERABLE` object, and not directly an element like in many other languages (like the `for` structure in Python for example).
|
||||
|
||||
=== the `from until` loop syntax===
|
||||
This syntax offer more possibilities than the `across` loop, but is riskier.
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
[[Property:modification_date|Wed, 17 Apr 2019 14:06:41 GMT]]
|
||||
[[Property:publication_date|Wed, 17 Apr 2019 14:02:25 GMT]]
|
||||
[[Property:uuid|5CA34C5D-30F1-4D6F-9FE4-B555E541EA8C]]
|
||||
[[Property:weight|4000]]
|
||||
[[Property:title|Managing CTRL+C in console application]]
|
||||
Normally, if the user use the CTRL+C keys, the Eiffel application detect it as an error and throw an exception of type <code>OPERATING_SYSTEM_SIGNAL_FAILURE</code>.
|
||||
Normally, if the user uses the CTRL+C keys, the Eiffel application detect it as an error and throw an exception of type <code>OPERATING_SYSTEM_SIGNAL_FAILURE</code>.
|
||||
|
||||
To manage the CTRL+C keys, you can use a <code>rescue</code> clause to detect the exception and a <code>retry</code> mecanism to cancel the exception handeling done by the Eiffel runtime.
|
||||
To manage the CTRL+C keys, you can use a <code>rescue</code> clause to detect the exception and a <code>retry</code> mechanism to cancel the exception handling done by the Eiffel runtime.
|
||||
|
||||
To detect the exception, you can <code>inherit</code> from the <code>EXCEPTIONS</code> class and use an attachment test on <code>Exception_manager.last_exception</code>.
|
||||
|
||||
Note that this code does not work on Windows. If used on Windows, the application will quit, but the <code>rescue</code> call is not launched.
|
||||
|
||||
<code>
|
||||
note
|
||||
description: "Show how to quit an application using CTRL+C (without trace)."
|
||||
|
||||
Reference in New Issue
Block a user