Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!chocolate!jacobs From: jacobs@chocolate.it.udel.edu (michael jacobs) Newsgroups: comp.lang.pascal Subject: Re: OOPS problems Keywords: Procedure variables Message-ID: <6950@nigel.udel.EDU> Date: 27 Dec 89 16:02:47 GMT References: <4516@hydra.gatech.EDU> Sender: usenet@udel.EDU Reply-To: jacobs@freezer.it.udel.edu (michael jacobs) Distribution: usa Organization: Yoyodyne Propulsion Systems Lines: 27 In article <4516@hydra.gatech.EDU> gt3070b@prism.gatech.EDU (Jeff Watkins) writes: =>I am trying to use procedure type variables inside an object definition. =>such as: =>MyObject= object => Proc1: Procedure; => Proc2: Procedure; => Proc3: Procedure; => => Procedure DoSumthing; => procedure DoSumThingelse; => Procedure DoYetAnotherThing; =>end; => =>when I try to assign proc1:=DoSumthing TP5.5 says "invalid procedure reference" Make Proc1,2,&3 pointers to procedures, and say proc1:=@DoSumThing. It probably didn't like your calls because it would be making a copy of the procedure, and if you wanted to run it later, it would have to run a procedure that is in the stack segment instead of the code segment. so they avoid it altogether by not allowing it. Mike J | The Grey Sysop... | Phone...RING!...yep yep yep yep yep! |