Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Creation of arr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 891 of 913
Post > Topic >>

Creation of arrays with complex types

by =?ISO-8859-1?Q?Roman_T=F6ngi?= <roman.toengi@[EMAIL PROTECTED] > Oct 24, 2007 at 06:40 PM

Is it possible to create an ARRAY [LINKED_LIST [G]] more elegantly  in a 
single step? If the number of array-elements is not known in advance, is 
there a dynamic version?

	bucket_sort is
			-- Sort array.
		local
			buckets: ARRAY [LINKED_LIST [G]]
			bucket_0: LINKED_LIST [G]
			bucket_1: LINKED_LIST [G]
			bucket_2: LINKED_LIST [G]
			bucket_3: LINKED_LIST [G]
			bucket_4: LINKED_LIST [G]
		do
			create buckets.make (0, 4)
			create bucket_0.make
			create bucket_1.make
			create bucket_2.make
			create bucket_3.make
			create bucket_4.make
			buckets.item (0) := bucket_0
			buckets.item (1) := bucket_1
			buckets.item (2) := bucket_2
			buckets.item (3) := bucket_3
			buckets.item (4) := bucket_4
		end


Many thanks
Roman




 3 Posts in Topic:
Creation of arrays with complex types
=?ISO-8859-1?Q?Roman_T=F6  2007-10-24 18:40:00 
Re: Creation of arrays with complex types
Jean RUPPERT <ruppertj  2007-10-24 22:08:29 
Re: Creation of arrays with complex types
=?ISO-8859-1?Q?Roman_T=F6  2007-10-24 23:31:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:58:23 CDT 2008.