Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -2,6 +2,7 @@ class
STOOGE_SORT
feature
stoogesort (ar: ARRAY[INTEGER]; i,j: INTEGER)
-- Sorted array in ascending order.
require
ar_not_empty: ar.count >= 0
i_in_range: i>=1

View file

@ -1,20 +1,32 @@
class
APPLICATION
inherit
ARGUMENTS
create
make
feature
make
do
test:= <<2,5,66,-2, 0, 7>>
io.put_string ("%Nunsorted:%N")
across test as ar loop io.put_string (ar.item.out + "%T") end
create stoogesort
stoogesort.stoogesort (test, 1, test.count)
io.put_string ("%Nsorted:%N")
across test as ar loop io.put_string (ar.item.out + "%T") end
end
test: ARRAY[INTEGER]
feature
make
do
test := <<2, 5, 66, -2, 0, 7>>
io.put_string ("%Nunsorted:%N")
across
test as ar
loop
io.put_string (ar.item.out + "%T")
end
create stoogesort
stoogesort.stoogesort (test, 1, test.count)
io.put_string ("%Nsorted:%N")
across
test as ar
loop
io.put_string (ar.item.out + "%T")
end
end
test: ARRAY [INTEGER]
stoogesort: STOOGE_SORT
end