Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!bu.edu!att!news.cs.indiana.edu!news.nd.edu!mentor.cc.purdue.edu!garlange From: garlange@mentor.cc.purdue.edu (Mark Garlanger) Newsgroups: comp.lang.pascal Subject: Re: TP5.5: Can't store method in procedure variable Keywords: Method Object Procedure TP5.5 Message-ID: <2218@mentor.cc.purdue.edu> Date: 4 Dec 90 03:53:29 GMT References: <1990Dec3.061013.22258@ux1.cso.uiuc.edu> Reply-To: garlange@mentor.cc.purdue.edu (Mark Garlanger) Organization: Purdue University Lines: 15 In article <1990Dec3.061013.22258@ux1.cso.uiuc.edu> dslg0849@uxa.cso.uiuc.edu (Daniel S. Lewart) writes: >I am attempting to store an object's method in a procedure variable in TP5.5. >However, I get a compiler error in the assignment statement. What am I doing >wrong? Is there some way to do what I want to do? > The question I have is WHY you would want to do this? Methods are closely tied to the data structure associated with it. What would you want the program to do with the method tries to access the data that the object has defined? What you are trying to do would cause many ambiguities for the compiler. I bet there is a way to solve your general problem by using the object-oriented programming directly, such as using virtual methods. I have done some work with objects and if you gave your general problem, I may be able to offer some hints on how to do it. Mark Brought to you by Super Global Mega Corp .com