home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!jeffbyrn
- From: jeffbyrn@mp.cs.niu.edu (Jeff Byrne)
- Subject: Re: Calling Local Procedures - SOLVED -
- Message-ID: <1992Dec22.060852.16456@mp.cs.niu.edu>
- Organization: Northern Illinois University
- References: <1992Dec21.233611.1711@mp.cs.niu.edu> <1992Dec21.235322.21824@mp.cs.niu.edu> <dmurdoch.241.724993410@mast.queensu.ca>
- Date: Tue, 22 Dec 1992 06:08:52 GMT
- Lines: 20
-
- Hi,
- Well my problem is solved thanks to Duncan Murdoch. He explained that
- a local procedure differs from a regular procedure only by the addition
- of a hidden word sized parameter containing the calling procedure's [BP].
-
- This is easy to fake by changing the procedure type declaration:
- Type
- LocalMethodType = Procedure (P : PTestObj); { Procedure Type }
- becomes:
- LocalMethodType = Procedure (P : PTestObj; BFrame : Word);
- { ^- This gets [BP] }
- The solution I tried before worked (sort of) because it was pushing the
- correct number onto the stack. However, they were in the wrong order.
-
- Thanks again to Duncan. If anyone is interested in a fixed version of
- my simple test program just send me some e-mail.
- Happy Holidays -
- - Jeff
- jeff@mp.cs.niu.edu
- jeff@art.niu.edu
-