new tasks

This commit is contained in:
Ingy döt Net 2013-04-09 00:46:50 -07:00
parent 2a4d27cea0
commit 80737d5a6a
1194 changed files with 15353 additions and 1 deletions

View file

@ -0,0 +1,33 @@
class
APPLICATION
inherit
ARGUMENTS
create
make
feature {NONE} -- Initialization
make
-- Run application.
do
-- initialize the array, index starts at 1 (not zero) and prefill everything with the letter z
create my_static_array.make_filled ("z", 1, 50)
my_static_array.put ("a", 1)
my_static_array.put ("b", 2)
my_static_array [3] := "c"
-- access to array fields
print (my_static_array.at(1) + "%N")
print (my_static_array.at(2) + "%N")
print (my_static_array [3] + "%N")
-- in Eiffel static arrays can be resized in three ways
my_static_array.force ("c", 51) -- forces 'c' in position 51 and resizes the array to that size (now 51 places)
my_static_array.automatic_grow -- adds 50% more indices (having now 76 places)
my_static_array.grow (100) -- resizes the array to 100 places
end
my_static_array: ARRAY [STRING]
end