mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 07:42:33 +01:00
Author:halw
Date:2010-02-27T19:53:07.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@487 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -6,42 +6,14 @@
|
|||||||
{{underconstruction}}
|
{{underconstruction}}
|
||||||
|
|
||||||
|
|
||||||
__NOTOC__
|
==Description==
|
||||||
|
|
||||||
==Problem Description==
|
|
||||||
|
|
||||||
Reverse the order of the characters in a give string of characters.
|
Reverse the order of the characters in a give string of characters.
|
||||||
|
|
||||||
==Problem Source==
|
==Source==
|
||||||
|
|
||||||
[http://rosettacode.org/wiki/Reverse_a_string Rosetta Code]
|
[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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,16 +10,19 @@ The examples in this book are somewhat different in nature and serve a different
|
|||||||
|
|
||||||
Although some of the examples included here are provided by Eiffel Software, the intent is that the majority of the entries will contributed by people like you who use Eiffel daily to solve real problems.
|
Although some of the examples included here are provided by Eiffel Software, the intent is that the majority of the entries will contributed by people like you who use Eiffel daily to solve real problems.
|
||||||
|
|
||||||
The inspiration for this book is the many ''programming 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 programming 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.
|
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.
|
||||||
|
|
||||||
Programming 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].
|
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.
|
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 to authority to release, and only if you are willing to have your work shared on one or more of the programming 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.)
|
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 to authority to release, and only if you are willing to have your work shared on one or more of the programming 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. This book will be organized around certain of these problems. So each child page to this page will have a number of children, which of which represents a programming problem ... each solution will occupy a child page to its problem page.
|
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 be limited to, certain of the problems used as challenges by program chrestomathies.
|
||||||
|
|
||||||
|
Each child page of this main page will support a list of children, each which represents a single programming problem. Individual solutions reside in pages which are children of their problem page.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user