Article View: comp.lang.modula2
Article #2107Re: executing from within a modula-program
From: Mark A. Morrell
Date: Mon, 16 Nov 1992 17:01
Date: Mon, 16 Nov 1992 17:01
29 lines
2101 bytes
2101 bytes
In article <1992Nov12.101226.10318@hippo.ru.ac.za> apj@beldin.sun.ac.za (Andries Dippenaar) writes: >Mark A. Morrell (mgmam@uxa.ecn.bgu.edu) wrote: >: > I use Topspeed modula 3.1 and had a problem in my last program. Does >: > anyone know how Ii can execute another program from a modula program so >: >: This is a procedure which stuffs a character into the keyboard buffer, >: and may be of use to you. Stuff the buffer, then exit your program. >: > [stuff deleted] > >That's not one of the better ways of doing it. TopSpeed supplies an >Execute procedure in Lib if I remember correctly. They've actuallt >got two flavours, Execute and ExecuteCmd. The former can only be used >to execute binaries (ie. .COM or .EXE files) and the latter is passed >a complete DOS commandline (like C's system command) which is then >executed under COMMAND.COM (actually %COMSPEC) so that you can also >run batch files. The easiest way to locate it in the libaries is to >type it in the editor, put the cursor over it and hit F1. Well, the message requested a way to leave the program, and then execute the command. Neither of these will do that for you. BTW, there is a third flavor to execute a command within JPI M2: Exec. The Execute command requires you to allocate space for the program to run in, and the Exec command does not. Exec also allows you to pass an alternate DOS environment to the command, while Execute does not. -- -------------------------------------------------------------------- Mark A. Morrell Disclaimer: _I_ probably don't even believe it. Literary Reference: The introduction to Cervantes' Don Quixote.
Technical Details
Message-ID:
<BxtJAp.LH2@uxa.ecn.bgu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!uwm.edu!linac!mp.cs.niu.edu!uxa.ecn.bgu.edu!mgmamReferences:
<BxJ2rn.Du4@uxa.ecn.bgu.edu> <1992Nov12.101226.10318@hippo.ru.ac.za>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2 Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!uwm.edu!linac!mp.cs.niu.edu!uxa.ecn.bgu.edu!mgmam From: mgmam@uxa.ecn.bgu.edu (Mark A. Morrell) Subject: Re: executing from within a modula-program Message-ID: <BxtJAp.LH2@uxa.ecn.bgu.edu> Organization: Educational Computing Network References: <BxJ2rn.Du4@uxa.ecn.bgu.edu> <1992Nov12.101226.10318@hippo.ru.ac.za> Date: Mon, 16 Nov 1992 17:01:36 GMT Lines: 30