Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!sunic!kth!draken!ttds!jonasn From: jonasn@ttds.UUCP (Jonas Nygren) Newsgroups: comp.lang.eiffel Subject: Generic types. Message-ID: <1238@ttds.UUCP> Date: 22 Aug 89 13:13:03 GMT Reply-To: jonasn@ttds.UUCP (Jonas Nygren) Organization: The Royal Inst. of Techn., Stockholm Lines: 26 Suppose one declares a class tree[T] like in the eiffel book. Is is then possible to write a member function tree.preorder_print where: preorder_print is Current.print; mark; gofirst; loop until offright sibling(T); T.preorder; next end loop The method 'print' is defined in T. (I know it's not formally correct eiffel but I hope you understand what I mean anyway) Would it be possible to pass the method as an arg to preorder, e g: preorder_print(M: ...) is Current.M; ... My belief is that none of these constructs are possible but I would appreciate if somebody could confirm my beliefs (or put me right). Are there any prefered solutions for the constructs above? Thanks in advance - Jonas Nygren