<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Introduction_to_examples</id>
		<title>Introduction to examples - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Introduction_to_examples"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Introduction_to_examples&amp;action=history"/>
		<updated>2026-04-07T12:19:19Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Introduction_to_examples&amp;diff=8823&amp;oldid=prev</id>
		<title>Juliant at 01:55, 23 June 2007</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Introduction_to_examples&amp;diff=8823&amp;oldid=prev"/>
				<updated>2007-06-23T01:55:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
[[Category:Catcall]]&lt;br /&gt;
The following classes will be used in various examples:&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== T, U, V and X, Y, Z ==&lt;br /&gt;
&lt;br /&gt;
A lot of examples mention types &amp;lt;e&amp;gt;T&amp;lt;/e&amp;gt;, &amp;lt;e&amp;gt;U&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;V&amp;lt;/e&amp;gt; or &amp;lt;e&amp;gt;X&amp;lt;/e&amp;gt;, &amp;lt;e&amp;gt;Y&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;Z&amp;lt;/e&amp;gt;. If not defined differently, these types are of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class T end&lt;br /&gt;
class U inherit T end&lt;br /&gt;
class V inherit U end&lt;br /&gt;
&lt;br /&gt;
class X end&lt;br /&gt;
class Y inherit X end&lt;br /&gt;
class Z inherit Y end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PERSON ==&lt;br /&gt;
&lt;br /&gt;
For a hierarchy with different endpoints, the person example is used as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class PERSON end&lt;br /&gt;
class STUDENT inherit PERSON end&lt;br /&gt;
class PROFESSOR inherit PERSON end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ANIMAL ==&lt;br /&gt;
&lt;br /&gt;
Examples involving catcalls use in general the following types:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class ANIMAL&lt;br /&gt;
feature&lt;br /&gt;
  eat (f: FOOD) do end&lt;br /&gt;
  sleep do end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class CAT inherit ANIMAL &lt;br /&gt;
  redefine eat end&lt;br /&gt;
  export {NONE} sleep end&lt;br /&gt;
feature&lt;br /&gt;
  eat (f: CAT_FOOD) do end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class DOG&lt;br /&gt;
inherit ANIMAL&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FOOD end&lt;br /&gt;
class CAT_FOOD inherit FOOD end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the class &amp;lt;e&amp;gt;CAT&amp;lt;/e&amp;gt; covariantly redefines &amp;lt;e&amp;gt;eat&amp;lt;/e&amp;gt; and restricts the export status of &amp;lt;e&amp;gt;sleep&amp;lt;/e&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Generics ==&lt;br /&gt;
&lt;br /&gt;
Generic classes used in examples are the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class LIST [G]&lt;br /&gt;
feature&lt;br /&gt;
  put (g: G) do end&lt;br /&gt;
  item: G&lt;br /&gt;
  append (other: LIST [G]) do end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class LINKED_LIST [G] inherit LIST [G] end&lt;br /&gt;
class ARRAYED_LIST [G] inherit LIST [G] end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class CELL [G]&lt;br /&gt;
feature&lt;br /&gt;
  put (g: G) do end&lt;br /&gt;
  item: G&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;/div&gt;</summary>
		<author><name>Juliant</name></author>	</entry>

	</feed>