mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-04-05 17:49:26 +02:00
Author:halw
Date:2009-05-11T22:10:12.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@213 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
[[Property:title|10 Other Mechanisms]]
|
||||
[[Property:link_title|ET: Other Mechanisms]]
|
||||
[[Property:title|ET: Other Mechanisms]]
|
||||
[[Property:weight|-4]]
|
||||
[[Property:uuid|c0a01664-194c-4e84-0517-8e7c1ca61dec]]
|
||||
We now examine a few important mechanisms that complement the preceding picture: shared objects; constants; instructions; and lexical conventions.
|
||||
@@ -30,7 +29,7 @@ Whatever client first calls this function will create the appropriate window and
|
||||
|
||||
For the classes using it, <code>console</code>, although a function, looks very much as if it were an attribute -- only one referring to a shared object.
|
||||
|
||||
The "Hello World" system at the beginning of this discussion (section [[4 Hello World|4]] ) used an output instruction of the form <code>io</code>. <code>put_string ( Some string )</code>. This is another example of the general scheme illustrated by <code>console</code>. Feature <code>io</code>, declared in <code>ANY</code> and hence usable by all classes, is a once function that returns an object of type <code>STANDARD_FILES</code> (another Kernel Library class) providing access to basic input and output features, one of which is procedure <code>put_string</code>. Because basic input and output must all work on the same files, <code>io</code> should clearly be a <code>once</code> function, shared by all classes that need these mechanisms.
|
||||
The "[[ET: Hello World|Hello World]]" system at the beginning of this discussion used an output instruction of the form <code>io</code>. <code>put_string ( Some string )</code>. This is another example of the general scheme illustrated by <code>console</code>. Feature <code>io</code>, declared in <code>ANY</code> and hence usable by all classes, is a once function that returns an object of type <code>STANDARD_FILES</code> (another Kernel Library class) providing access to basic input and output features, one of which is procedure <code>put_string</code>. Because basic input and output must all work on the same files, <code>io</code> should clearly be a <code>once</code> function, shared by all classes that need these mechanisms.
|
||||
|
||||
==Constant attributes==
|
||||
|
||||
@@ -188,7 +187,7 @@ The design flexibility afforded by the <code>obsolete</code> keyword is critical
|
||||
|
||||
==Creation variants==
|
||||
|
||||
The basic forms of creation instruction, and the one most commonly used, are the two illustrated earlier ( [[6 The Dynamic Structure: Execution Model#Creating_and_initializing_objects|"Creating and initializing objects"]] ):
|
||||
The basic forms of creation instruction, and the one most commonly used, are the two illustrated earlier ( [[ET: The Dynamic Structure: Execution Model#Creating_and_initializing_objects|"Creating and initializing objects"]] ):
|
||||
<code>
|
||||
create x.make (2000)
|
||||
create x
|
||||
|
||||
Reference in New Issue
Block a user