mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
create 19.12 branch
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2229 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
[[Property:modification_date|Thu, 22 Nov 2018 19:50:45 GMT]]
|
||||
[[Property:publication_date|Thu, 22 Nov 2018 19:50:45 GMT]]
|
||||
[[Property:title|Example: Command line arguments]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|ba852d83-3c02-4d38-088a-60b76fe5c63f]]
|
||||
==Description==
|
||||
|
||||
Retrieve the list of command-line arguments given to the program.
|
||||
Example command line:
|
||||
<code lang="text">
|
||||
myprogram -c "alpha beta" -h "gamma"
|
||||
</code>
|
||||
|
||||
==Notes==
|
||||
|
||||
This class inherits functionality for dealing with command line arguments from class <code lang="eiffel">ARGUMENTS</code>. It uses the feature <code lang="eiffel">separate_character_option_value</code> to return the values by option name for each of the two arguments. <code lang="eiffel">ARGUMENTS</code> provides a rich set of features for command line argument processing.
|
||||
|
||||
The simple version in [[#Solution|Solution]] below is as submitted to Rosetta Code to illustrate class <code lang="eiffel">ARGUMENTS</code>, but it should be noted that <code lang="eiffel">separate_character_option_value</code> is of a detached type and will return a void reference if no value is found for a specified character option. Therefore, a safer version of the use of <code lang="eiffel">separate_character_option_value</code> would include object test on the result:
|
||||
|
||||
<code>
|
||||
if attached separate_character_option_value ('c') as l_val then
|
||||
print ("Command line argument value for option 'c' is: ")
|
||||
print (l_val + "%N")
|
||||
end
|
||||
if attached separate_character_option_value ('h') as l_val then
|
||||
print ("Command line argument value for option 'h' is: ")
|
||||
print (l_val + "%N")
|
||||
end
|
||||
</code>
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/Command-line_arguments Rosetta Code]
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
inherit
|
||||
ARGUMENTS
|
||||
create
|
||||
make
|
||||
feature {NONE} -- Initialization
|
||||
make
|
||||
-- Print values for arguments with options 'c' and 'h'.
|
||||
do
|
||||
print ("Command line argument value for option 'c' is: ")
|
||||
print (separate_character_option_value ('c') + "%N")
|
||||
print ("Command line argument value for option 'h' is: ")
|
||||
print (separate_character_option_value ('h') + "%N")
|
||||
io.read_line -- Keep console window open
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output (for command line arguments: -c "alpha beta" -h "gamma")==
|
||||
|
||||
<code lang="text">
|
||||
Command line argument value for option 'c' is: alpha beta
|
||||
Command line argument value for option 'h' is: gamma
|
||||
</code>
|
||||
|
||||
|
||||
{{SeeAlso|[[Execution_profiles|How to run with arguments]]}}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[[Property:title|Example: Environment variables]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|60c39a34-0794-4c1f-a150-7431afa3e693]]
|
||||
==Description==
|
||||
|
||||
Using features from the class <code>EXECUTION_ENVIRONMENT</code> to create and retrieve an environment variable.
|
||||
|
||||
==Notes==
|
||||
|
||||
The <code>make</code> procedure of the class <code>APPLICATION</code> below uses the features <code>put</code> and <code>get</code>, inherited from the class <code>EXECUTION_ENVIRONMENT</code>, to create the environment variable <code>MY_VARIABLE</code> with value "Hello World!", and then to retrieve the value by key and print it.
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
inherit
|
||||
EXECUTION_ENVIRONMENT
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
make
|
||||
-- Create and retrieve an environment variable.
|
||||
do
|
||||
put ("Hello World!", "MY_VARIABLE")
|
||||
print (get ("MY_VARIABLE"))
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output==
|
||||
|
||||
<code lang="text">
|
||||
Hello World!
|
||||
</code>
|
||||
|
||||
|
||||
52
documentation/19.12/eiffel/Examples/example-file-io.wiki
Normal file
52
documentation/19.12/eiffel/Examples/example-file-io.wiki
Normal file
@@ -0,0 +1,52 @@
|
||||
[[Property:title|Example: File IO]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|b26aa8e3-5963-94ae-b523-642c8b79637b]]
|
||||
==Description==
|
||||
|
||||
Create a file "output.txt" containing the contents of "input.txt".
|
||||
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/File_IO Rosetta Code: File IO]
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Run application.
|
||||
do
|
||||
create input_file.make_open_read ("input.txt")
|
||||
create output_file.make_open_write ("output.txt")
|
||||
|
||||
from
|
||||
input_file.read_character
|
||||
until
|
||||
input_file.exhausted
|
||||
loop
|
||||
output_file.put (input_file.last_character)
|
||||
input_file.read_character
|
||||
end
|
||||
|
||||
input_file.close
|
||||
output_file.close
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
input_file: PLAIN_TEXT_FILE
|
||||
output_file: PLAIN_TEXT_FILE
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
|
||||
218
documentation/19.12/eiffel/Examples/example-polymorphism.wiki
Normal file
218
documentation/19.12/eiffel/Examples/example-polymorphism.wiki
Normal file
@@ -0,0 +1,218 @@
|
||||
[[Property:title|Example: Polymorphism]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|e4a9db32-c087-21b7-f0d6-4685f0ce249d]]
|
||||
==Description==
|
||||
|
||||
Create a class POINT and its heir CIRCLE to demonstrate polymorphic attachment and dynamic binding.
|
||||
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/Polymorphism Rosetta Code: Polymorphism]
|
||||
|
||||
Solution varies from Rosetta Code description (e. g., feature <code>out</code> is redefined in this solution, versus feature <code>print</code>.)
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
POINT
|
||||
inherit
|
||||
ANY
|
||||
redefine
|
||||
out
|
||||
end
|
||||
create
|
||||
make, make_origin
|
||||
|
||||
feature -- Initialization
|
||||
|
||||
make (a_x, a_y: INTEGER)
|
||||
-- Create with values `a_x' and `a_y'
|
||||
do
|
||||
set_x (a_x)
|
||||
set_y (a_y)
|
||||
ensure
|
||||
x_set: x = a_x
|
||||
y_set: y = a_y
|
||||
end
|
||||
|
||||
make_origin
|
||||
-- Create at origin
|
||||
do
|
||||
ensure
|
||||
x_set: x = 0
|
||||
y_set: y = 0
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
x: INTEGER assign set_x
|
||||
-- Horizontal axis coordinate
|
||||
|
||||
y: INTEGER assign set_y
|
||||
-- Vertical axis coordinate
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_x (a_x: INTEGER)
|
||||
-- Set `x' coordinate to `a_x'
|
||||
do
|
||||
x := a_x
|
||||
ensure
|
||||
x_set: x = a_x
|
||||
end
|
||||
|
||||
set_y (a_y: INTEGER)
|
||||
-- Set `y' coordinate to `a_y'
|
||||
do
|
||||
y := a_y
|
||||
ensure
|
||||
y_set: y = a_y
|
||||
end
|
||||
|
||||
feature -- Output
|
||||
|
||||
out: STRING
|
||||
-- Display as string
|
||||
do
|
||||
Result := "Point: x = " + x.out + " y = " + y.out
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
<code>
|
||||
class
|
||||
CIRCLE
|
||||
|
||||
inherit
|
||||
POINT
|
||||
rename
|
||||
make as point_make
|
||||
redefine
|
||||
make_origin,
|
||||
out
|
||||
end
|
||||
create
|
||||
make, make_origin, make_from_point
|
||||
|
||||
feature -- Initialization
|
||||
|
||||
make (a_x, a_y, a_r: INTEGER)
|
||||
-- Create with values `a_x' and `a_y' and `a_r'
|
||||
require
|
||||
non_negative_radius_argument: a_r >= 0
|
||||
do
|
||||
point_make (a_x, a_y)
|
||||
set_r (a_r)
|
||||
ensure
|
||||
x_set: x = a_x
|
||||
y_set: y = a_y
|
||||
r_set: r = a_r
|
||||
end
|
||||
|
||||
make_origin
|
||||
-- Create at origin with zero radius
|
||||
do
|
||||
Precursor
|
||||
ensure then
|
||||
r_set: r = 0
|
||||
end
|
||||
|
||||
make_from_point (a_p: POINT; a_r: INTEGER)
|
||||
-- Initialize from `a_r' with radius `a_r'.
|
||||
require
|
||||
non_negative_radius_argument: a_r >= 0
|
||||
do
|
||||
set_x (a_p.x)
|
||||
set_y (a_p.y)
|
||||
set_r (a_r)
|
||||
ensure
|
||||
x_set: x = a_p.x
|
||||
y_set: y = a_p.y
|
||||
r_set: r = a_r
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
r: INTEGER assign set_r
|
||||
-- Radius
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_r (a_r: INTEGER)
|
||||
-- Set radius (`r') to `a_r'
|
||||
require
|
||||
non_negative_radius_argument: a_r >= 0
|
||||
do
|
||||
r := a_r
|
||||
ensure
|
||||
r_set: r = a_r
|
||||
end
|
||||
|
||||
feature -- Output
|
||||
|
||||
out: STRING
|
||||
-- Display as string
|
||||
do
|
||||
Result := "Circle: x = " + x.out + " y = " + y.out + " r = " + r.out
|
||||
end
|
||||
|
||||
invariant
|
||||
|
||||
non_negative_radius: r >= 0
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Run application.
|
||||
local
|
||||
my_point: POINT
|
||||
my_circle: CIRCLE
|
||||
do
|
||||
create my_point.make_origin
|
||||
print (my_point.out + "%N")
|
||||
|
||||
create {CIRCLE} my_point.make_origin
|
||||
print (my_point.out + "%N")
|
||||
|
||||
create my_point.make (10, 15)
|
||||
print (my_point.out + "%N")
|
||||
|
||||
create {CIRCLE} my_point.make (20, 25, 5)
|
||||
print (my_point.out + "%N")
|
||||
|
||||
create my_circle.make (30, 35, 10)
|
||||
print (my_circle.out + "%N")
|
||||
|
||||
create my_circle.make_from_point (my_point, 35)
|
||||
print (my_circle.out + "%N")
|
||||
end
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output==
|
||||
|
||||
<code lang="text">
|
||||
Point: x = 0 y = 0
|
||||
Circle: x = 0 y = 0 r = 0
|
||||
Point: x = 10 y = 15
|
||||
Circle: x = 20 y = 25 r = 5
|
||||
Circle: x = 30 y = 35 r = 10
|
||||
Circle: x = 20 y = 25 r = 35
|
||||
</code>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[[Property:title|Example: Reverse a string]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|d888d308-6bb7-edd5-ee25-92d04b5658d3]]
|
||||
==Description==
|
||||
|
||||
Reverse the order of the characters in a give string of characters.
|
||||
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/Reverse_a_string Rosetta Code]
|
||||
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
create
|
||||
make
|
||||
feature
|
||||
make
|
||||
-- Demonstrate string reversal.
|
||||
do
|
||||
my_string := "Hello World!"
|
||||
my_string.mirror
|
||||
print (my_string)
|
||||
end
|
||||
my_string: STRING
|
||||
-- Used for reversal
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output==
|
||||
|
||||
<code lang="text">
|
||||
!dlroW olleH
|
||||
</code>
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
[[Property:title|Example: Self-initializing attributes and assigner commands]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|dbc107a4-42cd-606a-71b2-e0b70ac5482e]]
|
||||
==Description==
|
||||
|
||||
Example of using a [[Void-safety: Background, definition, and tools#Self-initializing attributes|self-initializing attribute]] and an [[ET: The Dynamic Structure: Execution Model#Assigner commands|assigner command]].
|
||||
|
||||
==Notes==
|
||||
|
||||
The concepts of [[Void-safety: Background, definition, and tools#Self-initializing attributes|self-initializing attributes]] and [[ET: The Dynamic Structure: Execution Model#Assigner commands|assigner commands]] are independent of one another. However, this example shows how each works in a small amount of code.
|
||||
|
||||
The example consists of two classes: a root class, and class <code>PERSON</code>. The <code>PERSON</code> class has a self-initializing attribute of type <code>STRING</code> named <code>mood</code>. If <code>mood</code> is accessed before it is explicitly initialized, then the self-initializing code after the keyword <code>attribute</code> will be executed, setting the default mood to "Happy".
|
||||
|
||||
The attribute <code>mood</code> also has an assigner command, the procedure <code>set_mood</code>, designated as such by the <code>assign</code> keyword. This allows clients of class <code>PERSON</code> to appear to assign directly to <code>mood</code>. However, the assigner command <code>set_mood</code> will always get executed, and its precondition will be in force during such an apparent assignment.
|
||||
|
||||
The root class <code>APPLICATION</code> creates an instance of <code>PERSON</code> and prints the value of <code>mood</code>, getting the self-iniitalized value. Then it assigns to <code>mood</code>. When it prints again, it gets the updated value.
|
||||
|
||||
==Source==
|
||||
|
||||
Adapted from an example given on the Eiffel Software Users Group.
|
||||
|
||||
==Solution==
|
||||
|
||||
A root class:
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Print and set mood of `my_person'.
|
||||
do
|
||||
create my_person
|
||||
print ("Mood: " + my_person.mood + "%N")
|
||||
my_person.mood := "Ecstatic"
|
||||
print ("Mood: " + my_person.mood + "%N")
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
my_person: PERSON
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
Class PERSON:
|
||||
|
||||
<code>
|
||||
class
|
||||
PERSON
|
||||
|
||||
feature -- Access
|
||||
|
||||
mood: STRING assign set_mood
|
||||
attribute
|
||||
Result := "Happy"
|
||||
end
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_mood (a_string: STRING)
|
||||
require
|
||||
single_token: a_string.occurrences (' ') = 0
|
||||
do
|
||||
mood := a_string
|
||||
ensure
|
||||
mood_set: mood = a_string
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
==Output==
|
||||
|
||||
<code>
|
||||
Mood: Happy
|
||||
Mood: Ecstatic
|
||||
</code>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
[[Property:title|Example: Sieve of Eratosthenes]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|e825c874-4266-b5ee-501c-221e6940dacd]]
|
||||
==Description==
|
||||
|
||||
Deliver prime numbers up to a specified integer limit. Compute prime numbers using sieve of Eratosthenes.
|
||||
|
||||
==Notes==
|
||||
|
||||
This example uses the ''iteration'' (<code>across</code>) form of the Eiffel loop construct to traverse a list, an array, and an integer interval.
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/Sieve_of_Eratosthenes Rosetta Code]
|
||||
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature
|
||||
make
|
||||
-- Run application.
|
||||
do
|
||||
across primes_through (100) as ic loop print (ic.item.out + " ") end
|
||||
end
|
||||
|
||||
primes_through (a_limit: INTEGER): LINKED_LIST [INTEGER]
|
||||
-- Prime numbers through `a_limit'
|
||||
require
|
||||
valid_upper_limit: a_limit >= 2
|
||||
local
|
||||
l_tab: ARRAY [BOOLEAN]
|
||||
do
|
||||
create Result.make
|
||||
create l_tab.make_filled (True, 2, a_limit)
|
||||
across
|
||||
l_tab as ic
|
||||
loop
|
||||
if ic.item then
|
||||
Result.extend (ic.target_index)
|
||||
across ((ic.target_index * ic.target_index) |..| l_tab.upper).new_cursor.with_step (ic.target_index) as id
|
||||
loop
|
||||
l_tab [id.item] := False
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output==
|
||||
|
||||
<code lang="text">
|
||||
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
|
||||
</code>
|
||||
|
||||
|
||||
54
documentation/19.12/eiffel/Examples/example-sleep.wiki
Normal file
54
documentation/19.12/eiffel/Examples/example-sleep.wiki
Normal file
@@ -0,0 +1,54 @@
|
||||
[[Property:title|Example: Sleep]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|a846db1c-2096-43a9-bb8b-a233c9e21421]]
|
||||
==Description==
|
||||
|
||||
Write a program that does the following in this order:
|
||||
# Input an amount of time to sleep in whatever units are most natural for your language (milliseconds, seconds, ticks, etc.). This unit should be noted in comments or in a description.
|
||||
# Print "Sleeping..."
|
||||
# Sleep the main thread for the given amount of time.
|
||||
# Print "Awake!"
|
||||
# End.
|
||||
|
||||
==Notes==
|
||||
|
||||
The feature <code lang="eiffel">sleep</code> is defined in the library class <code>EXECUTION_ENVIRONMENT</code>. So the demonstration class <code>APPLICATION</code> inherits from <code>EXECUTION_ENVIRONMENT</code> in order to make <code lang="eiffel">sleep</code> available.
|
||||
|
||||
<code lang="eiffel">sleep</code> takes an argument which declares the number of nanoseconds to suspend the thread's execution.
|
||||
|
||||
==Source==
|
||||
|
||||
Problem description from [http://rosettacode.org/wiki/Sleep Rosetta Code]
|
||||
|
||||
==Solution==
|
||||
|
||||
<code>
|
||||
class
|
||||
APPLICATION
|
||||
inherit
|
||||
EXECUTION_ENVIRONMENT
|
||||
create
|
||||
make
|
||||
feature -- Initialization
|
||||
make
|
||||
-- Sleep for a given number of nanoseconds.
|
||||
do
|
||||
print ("Enter a number of nanoseconds: ")
|
||||
io.read_integer_64
|
||||
print ("Sleeping...%N")
|
||||
sleep (io.last_integer_64)
|
||||
print ("Awake!%N")
|
||||
end
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Output (sleeping 10 seconds)==
|
||||
|
||||
<code lang="text">
|
||||
Enter a number of nanoseconds: 10000000000
|
||||
Sleeping...
|
||||
Awake!
|
||||
</code>
|
||||
|
||||
|
||||
10
documentation/19.12/eiffel/Examples/index.wiki
Normal file
10
documentation/19.12/eiffel/Examples/index.wiki
Normal file
@@ -0,0 +1,10 @@
|
||||
[[Property:title|Examples]]
|
||||
[[Property:description|how common programming problems can be solved using Eiffel]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|1a59e03b-8bf0-8426-43b4-577761e40790]]
|
||||
Here you will find examples of how common programming problems can be solved using Eiffel.
|
||||
|
||||
A set of examples is also included with the EiffelStudio distribution kit.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[[Property:modification_date|Mon, 10 Sep 2018 09:10:34 GMT]]
|
||||
[[Property:publication_date|Mon, 10 Sep 2018 09:10:34 GMT]]
|
||||
[[Property:title|Introduction to the Examples Book]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|044fa742-f3ca-9f5b-01cc-7194ee172b08]]
|
||||
|
||||
EiffelStudio comes with a rich set of examples that you can use to learn how to use the many Eiffel facilities and libraries. You should look first to the examples distributed with EiffelStudio as your primary source of samples of Eiffel in use.
|
||||
|
||||
The examples in this book are somewhat different in nature and serve a different purpose.
|
||||
|
||||
Although some of the examples included here are provided by Eiffel Software, the intent is that the majority of the entries will be contributed by people like you who use Eiffel daily to solve real problems.
|
||||
|
||||
The inspiration for this book is the many ''program chrestomathies'' on the World-Wide Web. In natural language, a chrestomathy is a set of literary passages explicitly selected for the purpose of helping learn a language. A program chrestomathy is a set of problems for which solutions are represented in various programming languages with the aim of allowing programmers to compare language capabilities and programming techniques.
|
||||
|
||||
Program chrestomathies vary widely. At one end of the spectrum [http://99-bottles-of-beer.net/ 99 Bottles of Beer] has collected solutions in over one thousand programming languages, all targeted to a single problem: generate and print the complete lyrics of the song ''99 Bottles of Beer on the Wall''. There are several "Hello world!" chrestomathies. Other sites host multiple programming problems, all with solutions in many languages. One large multi-problem site is [http://rosettacode.org/wiki/Main_Page Rosetta Code]. In fact, Rosetta Code maintains a [http://rosettacode.org/wiki/Help:Similar_Sites list of links to many of the Web's other programming chrestomathy projects].
|
||||
|
||||
Eiffel has a presence on many of these sites. Still, the more examples, the better.
|
||||
|
||||
The purpose of the examples in this book, then, is two-fold. First, we get a set of Eiffel examples in the Eiffel online documentation with solutions to a different set of problems than the examples distributed with EiffelStudio. Second, examples from this set can be migrated to Rosetta Code or one of the other chrestomathies to improve Eiffel's presence on those sites. (The caveat to contributors is clear: '''Contribute only work that you have the authority to release, and only if you are willing to have your work shared on one or more of the program chrestomathies.''' By submitting content to this Examples book, you agree to release that content under terms no more restrictive than the GNU Free Documentation License.)
|
||||
|
||||
Sites like Rosetta Code and [http://en.literateprograms.org/LiteratePrograms:Welcome Literate Programs] offer a wide variety of programming problems or tasks for comparison of languages and techniques. Rosetta Code provides an index to the [http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Eiffel tasks not yet implemented in Eiffel].
|
||||
|
||||
This book should include, but not necessarily be limited to, certain of the problems used as challenges by program chrestomathies.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user