From: Müller G. <glo...@st...> - 2008-08-05 14:27:30
|
Hi all I found a way to make gec produce this: feiffel1.c: In function T22c1: feiffel1.c:272: warning: assignment makes integer from pointer without a cast To do this you create a class with a generic parameter e.g. like this: class BUG_REPORT_1_SHORT[G] create make feature -- Initialization make(first_item: G) is local tmp: INTEGER_64 do tmp ?= first_item end end -- class Then you call make from another class, e.g. like this: local i: INTEGER sw: BUG_REPORT_1_SHORT[INTEGER] do create sw.make(1) end Kind regards, Gloria PS: Something unrelated. I wanted to time my code. Is it really that Eiffel can only measure time up to a precision of seconds? If I want to time my code I need at least nanoseconds. Any idea how to do this? Using command line "time" is inconvenient. I want to measure time of little code pieces not of the entire app. |