Path: utzoo!attcan!telly!lethe!torsqnt!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!deimos.cis.ksu.edu!ksuvax1.cis.ksu.edu!wyoung From: wyoung@ksuvax1.cis.ksu.edu (William J. Young) Newsgroups: comp.lang.pascal Subject: Re: Calling alien programs in Turbo Pascal, how? Keywords: Alien Pascal Message-ID: <0xe34@deimos.cis.ksu.edu> Date: 22 Sep 89 14:54:07 GMT References: <5644@decvax.dec.com> Sender: news@deimos.cis.ksu.edu Reply-To: wyoung@ksuvax1.cis.ksu.edu (William J. Young) Organization: Kansas State University, Dept of Computing & Information Sciences Lines: 31 In article <5644@decvax.dec.com> f0057@uafhp.uucp (James E. Ward) writes: >... The idea I want to try is to call an editor on a >text file from within the application so the user will have the >ultimate in expandability and editing of this field. My question to >you is: >Can this be done in Turbo Pascal 3.0? Must we convert the massive >thing to Turbo 5.0 (we have it)? Can it be done from Turbo Pascal >5.0? If so, how? >In psuedocode, I believe it would go something like: >command = "editor " + filename >system(command) Your pseudocode is basically right. However, TP3.x does not have the EXEC procedure that is found in TP4 and TP5. You could use the DOS function call (using the TP3 MSDOS procedure - not sure that is the right name for the procedure, as I no longer have my TP3 docs). You'll have to get yourself a tech manual or a book on DOS function calls to find out what the right function is. CAUTION: I don't remember how TP DB Toolbox allocates memory (if that is what you are using - or I don't know how you are allocating memory), but it is up to you to free sufficient memory for whatever you are calling before you make the DOS function call. This includes the heap space! Good luck. -- ---------------------------- Bill Young 1408 Cambridge Place, Apt 19 Manhattan, KS 66502 (913) 537-6840 Internet: wyoung@ksuvax1.cis.ksu.edu, wyoung%ksuvax1@harris.cis.ksu.edu BITNET: wyoung@ksuvax1.bitnet, wyoung%ksuvax1.bitnet@cunyvm.cuny.edu