Path: utzoo!utgpu!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Executing a code segement from Lightspeed Pascal? Message-ID: <26344@ucbvax.BERKELEY.EDU> Date: 5 Oct 88 23:51:55 GMT References: <8810051239.AA09466@decwrl.dec.com> <10284@dartvax.Dartmouth.EDU> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 26 As others have pointed out: 1.) you can use inline code 2.) you can use an assembly language glue routine linked into your program. Now: 3.) you can use pascal itself. Pascal lets you write routines with procedure valued parameters. Just call it with the argument: procedure callpascal(procedure a(b:integer); b:integer); begin a(b); end; now, suppose foo is a procedure pointer variable. if you say: callpascal( appropriatecasttocircumventpascaltypechecking(foo), 22); it will do the right thing. You can play games by breaking the program up into multiple files and declaring callpascal() differently where it is defined from where it is used. --- David Phillip Oster --When you asked me to live in sin with you Arpa: oster@dewey.soe.berkeley.edu --I didn't know you meant sloth. Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu