mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 07:42:33 +01:00
merged from 19.05
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2228 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
[[Property:modification_date|Wed, 11 Sep 2019 23:28:26 GMT]]
|
||||
[[Property:publication_date|Wed, 11 Sep 2019 23:28:26 GMT]]
|
||||
[[Property:uuid|C652AC71-8BAD-4387-A46C-21C9F5C3A68F]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:title|Conditional expression]]
|
||||
[[Property:link_title|Conditional]]
|
||||
|
||||
[[Eiffel%20Programming%20Language%20Syntax#Conditionals|Conditional expressions]] compute a value using different expressions depending on one or more conditions. If all expressions have the same type, the conditional expression as a whole has this type as well:
|
||||
[[Eiffel_programming_language_syntax#Conditionals|Conditional expressions]] compute a value using different expressions depending on one or more conditions. If all expressions have the same type, the conditional expression as a whole has this type as well:
|
||||
|
||||
<e>
|
||||
if time < noon then
|
||||
@@ -17,7 +19,7 @@
|
||||
|
||||
has type `STRING`.
|
||||
|
||||
If the types of the expressions are different, the [[Types#Common ancestor types|common ancestor type]] is used as a type of the whole expression.
|
||||
If the types of the expressions are different, the [[Types#Common_ancestor_types|common ancestor type]] is used as a type of the whole expression.
|
||||
|
||||
<e>
|
||||
if time < noon then
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Wed, 11 Sep 2019 18:53:32 GMT]]
|
||||
[[Property:publication_date|Wed, 11 Sep 2019 14:10:27 GMT]]
|
||||
[[Property:title|Eiffel programming language reserved words]]
|
||||
[[Property:link_title|Reserved words]]
|
||||
[[Property:weight|1]]
|
||||
@@ -152,12 +154,16 @@ Introduces a sequence of instructions as a routine body, as shown in the [[ET: H
|
||||
|
||||
===else===
|
||||
|
||||
Used in [[ET: Other Mechanisms#Conditional|conditional]] and [[ET: Other Mechanisms#Multi-branch|multi-branch]] instructions to introduce a sequence of instructions to be executed in the case that no specified conditions are met.
|
||||
Used in [[ET-_Instructions#Conditional|conditional]] and [[ET-_Instructions#Multi-branch|multi-branch]] instructions to introduce a sequence of instructions to be executed in the case that no specified conditions are met.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional syntax.]]
|
||||
|
||||
:[[Eiffel programming language syntax#Multi-branch instructions|Multi-branch syntax.]]
|
||||
|
||||
Used in a [[Conditional_expression|conditional expression]] to compute a value in the case that no specified conditions are met.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional expression syntax.]]
|
||||
|
||||
Used as part of the double reserved word <code>or else</code>, the semi-strict disjunction operator.
|
||||
|
||||
:[[Eiffel programming language syntax#Operators|Syntax.]]
|
||||
@@ -169,10 +175,14 @@ Used after the reserved word [[#require|<code>require</code>]] as a precondition
|
||||
|
||||
===elseif===
|
||||
|
||||
Used in [[ET: Other Mechanisms#Conditional|conditional]] instructions to effect a "multi-branch" choice instruction.
|
||||
Used in [[ET-_Instructions#Conditional|conditional]] instructions to effect a "multi-branch" choice instruction.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Syntax.]]
|
||||
|
||||
Used in a [[Conditional_expression|conditional expression]] to effect a "multi-branch" choice to compute of a value.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional expression syntax.]]
|
||||
|
||||
|
||||
===end===
|
||||
|
||||
@@ -186,6 +196,7 @@ Serves to terminate several Eiffel programming language constructs.
|
||||
::[[Eiffel programming language syntax#Generic constraints|Generic constraints: renaming and constraint creators]]
|
||||
::[[Eiffel programming language syntax#Conditionals|Conditional instructions]]
|
||||
::[[Eiffel programming language syntax#Multi-branch instructions|Multi-branch instructions]]
|
||||
::[[Eiffel programming language syntax#Conditionals|Conditional expressions]]
|
||||
::[[Eiffel programming language syntax#Loops|Loops]]
|
||||
::[[Eiffel programming language syntax#Debug instructions|Debug instructions]]
|
||||
|
||||
@@ -258,9 +269,13 @@ Used with a formal generic parameter to indicate that conformance of generic der
|
||||
|
||||
===if===
|
||||
|
||||
Introduces a [[ET: Other Mechanisms#Conditional|conditional]].
|
||||
Used to introduce a [[ET-_Instructions#Conditional|conditional]].
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Syntax.]]
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional syntax.]]
|
||||
|
||||
Used to introduce a [[Conditional_expression|Conditional expression]].
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional expression syntax.]]
|
||||
|
||||
|
||||
===implies===
|
||||
@@ -277,7 +292,7 @@ Used in an [[ET: Inheritance|inherit]] clause.
|
||||
|
||||
===inspect===
|
||||
|
||||
Introduces a [[ET: Other Mechanisms#Multi-branch|multi-branch]] instruction.
|
||||
Introduces a [[ET-_Instructions#Multi-branch|multi-branch]] instruction.
|
||||
|
||||
:[[Eiffel programming language syntax#Multi-branch instructions|Syntax.]]
|
||||
|
||||
@@ -437,12 +452,16 @@ Reserved for future use.
|
||||
|
||||
===then===
|
||||
|
||||
Used in [[ET: Other Mechanisms#Conditional|conditional]] and [[ET: Other Mechanisms#Multi-branch|multi-branch]] instructions to introduce a sequence of instructions to be executed in the case that a condition is met.
|
||||
Used in [[ET-_Instructions#Conditional|conditional]] and [[ET-_Instructions#Multi-branch|multi-branch]] instructions to introduce a sequence of instructions to be executed in the case that a condition is met.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional syntax.]]
|
||||
|
||||
:[[Eiffel programming language syntax#Multi-branch instructions|Multi-branch syntax.]]
|
||||
|
||||
Used in a [[Conditional_expression|conditional expression]] to compute of a value in the case that a condition is met.
|
||||
|
||||
:[[Eiffel programming language syntax#Conditionals|Conditional expression syntax.]]
|
||||
|
||||
Used as part of the double reserved word <code>and then</code>, the semi-strict conjunction operator.
|
||||
|
||||
:[[Eiffel programming language syntax#Operators|Syntax.]]
|
||||
@@ -494,7 +513,7 @@ A predefined entity name representing a [[ET: The Dynamic Structure: Execution M
|
||||
|
||||
===when===
|
||||
|
||||
Used in a [[ET: Other Mechanisms#Multi-branch|multi-branch instruction]] to introduce cases.
|
||||
Used in a [[ET-_Instructions#Multi-branch|multi-branch instruction]] to introduce cases.
|
||||
|
||||
:[[Eiffel programming language syntax#Multi-branch instructions|Syntax.]]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Tue, 30 Apr 2019 07:27:55 GMT]]
|
||||
[[Property:modification_date|Mon, 29 Jul 2019 16:52:51 GMT]]
|
||||
[[Property:publication_date|Mon, 29 Apr 2019 14:08:51 GMT]]
|
||||
[[Property:title|Eiffel programming language syntax]]
|
||||
[[Property:link_title|Syntax]]
|
||||
@@ -118,6 +118,9 @@ A sequence of characters consisting of the following, in order:
|
||||
|
||||
Line wrapping parts are used as separators between one [[#Simple strings|Simple_string]] and the next in a [[#Manifest strings|Basic_manifest_string]] so that the string can be split across lines.
|
||||
|
||||
===New line===
|
||||
|
||||
A specimen of New_line is a New Line.
|
||||
|
||||
|
||||
==Eiffel BNF-E Syntax==
|
||||
@@ -334,12 +337,14 @@ Assertion ::= {Assertion_clause ";" ...}*
|
||||
|
||||
Assertion_clause ::= <nowiki>[</nowiki>Tag_mark<nowiki>]</nowiki> Unlabeled_assertion_clause
|
||||
|
||||
Unlabeled_assertion_clause ::= [[#Expressions|Boolean_expression]] | [[#Comments|Comment]]
|
||||
Unlabeled_assertion_clause ::= [[#Expressions|Boolean_expression]] | [[#Comments|Comment]] | `class`
|
||||
|
||||
Tag_mark ::= Tag ":"
|
||||
|
||||
Tag ::= [[#Identfiers|Identifier]]
|
||||
|
||||
{{Note|Unlabeled_assertion_clause of the form `class` can be used only in a postcondition. It marks a feature that does not depend on object state and can be called without a target object using non-object call of the form `{CLASS_NAME}.feature_name (arguments)`.}}
|
||||
|
||||
|
||||
==="Old" postcondition expressions ===
|
||||
Old ::= <code>old</code> [[#Expressions|Expression]]
|
||||
@@ -702,16 +707,11 @@ Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Sim
|
||||
|
||||
Open_bracket ::= <nowiki>"[" | "{"</nowiki>
|
||||
|
||||
Close_bracket ::= "]" | "}"Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer
|
||||
Close_bracket ::= "]" | "}"
|
||||
|
||||
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket
|
||||
|
||||
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " '
|
||||
|
||||
Open_bracket ::= <nowiki>"[" | "{" </nowiki>
|
||||
|
||||
Close_bracket ::= <nowiki>"]" | "}" </nowiki>
|
||||
Line_sequence ::= {[[#Simple strings|Simple_string]] [[#New line|New_line]] ...}+
|
||||
|
||||
{{Note|Exactly the same [[#Simple strings|Simple_string]] (including embedded white space, if any) should be used in ''Verbatim_string_opener'' and ''Verbatim_string_closer'' of the same verbatim string.}}
|
||||
|
||||
===External routines ===
|
||||
External ::= <code>external</code> External_language <nowiki>[External_name]</nowiki>
|
||||
|
||||
Reference in New Issue
Block a user