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 > compilation err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 889 of 909
Post > Topic >>

compilation error

by =?ISO-8859-1?Q?Roman_T=F6ngi?= <roman.toengi@[EMAIL PROTECTED] > Oct 18, 2007 at 11:32 AM

I want to traverse a binary search tree and output
each node-item.
The following does not compile but I have no idea why not.
The actual argument "v" has type INTEGER_32.
See error message below.

class
	APPLICATION
create
	make
feature -- Initialization
	make is
			-- Run application.
		local
			tree: MY_TREE [INTEGER]
		do
			create tree.make (500)
			tree.put (200)
			tree.put (100)
			tree.put (150)
			tree.put (125)
			tree.put (600)
			tree.put (550)
			tree.put (800)
			tree.put (700)
			tree.put (650)
			tree.put (750)
			tree.put (725)
			tree.i_infix
		end
end -- class APPLICATION


class
	MY_TREE [G -> COMPARABLE]
inherit
	BINARY_SEARCH_TREE [G]
		redefine
			node_action
		end
create
	make
feature -- Cursor movement
	node_action (v: like item) is
			-- Perfom action on item.
		do
			io.put_integer (v)
			io.put_character (' ')
		end
invariant
	invariant_clause: True -- Your invariant here
end -- class MY_TREE



Error code: VUAR(2)
Type error: non-conforming actual argument in feature call.
What to do: make sure that type of actual argument conforms to type
   of corresponding formal argument.

Class: MY_TREE [G -> COMPARABLE]
Feature: node_action
Called feature: put_integer (i: INTEGER_32) from STD_FILES
Argument name: i
Argument position: 1
Actual argument type: Generic #1
Formal argument type: INTEGER_32
Line: 32
       do
->      io.put_integer (v)
         io.put_character (' ')





Thanks a lot
Roman




 5 Posts in Topic:
compilation error
=?ISO-8859-1?Q?Roman_T=F6  2007-10-18 11:32:28 
Re: compilation error
Friedrich Dominicus <j  2007-10-18 12:36:40 
Re: compilation error
=?ISO-8859-15?Q?Roman_T=F  2007-10-18 13:34:14 
Re: compilation error
J <jocelyn-fake-email@  2007-10-18 14:52:01 
Re: compilation error
Friedrich Dominicus <j  2007-10-18 15:01:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Mon May 12 3:15:51 CDT 2008.