mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 07:42:33 +01:00
Author:halw
Date:2010-03-01T17:50:15.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@490 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
[[Property:link_title|Example: Reverse a string]]
|
[[Property:link_title|Example: Reverse a string]]
|
||||||
[[Property:weight|0]]
|
[[Property:weight|0]]
|
||||||
[[Property:uuid|d888d308-6bb7-edd5-ee25-92d04b5658d3]]
|
[[Property:uuid|d888d308-6bb7-edd5-ee25-92d04b5658d3]]
|
||||||
|
|
||||||
{{underconstruction}}
|
{{underconstruction}}
|
||||||
|
|
||||||
|
|
||||||
@@ -14,6 +13,31 @@ Reverse the order of the characters in a give string of characters.
|
|||||||
|
|
||||||
[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>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,11 +22,7 @@ The purpose of the examples in this book, then, is two-fold. First, we get a set
|
|||||||
|
|
||||||
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].
|
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.
|
This book should include, but not necessarily 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 of those represents a single programming problem. Individual solutions reside in pages which are children of their problem page. This organization is depicted in the figure below.
|
|
||||||
|
|
||||||
|
|
||||||
[[Image:Examples book organization]]
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user