home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1400 < prev    next >
Encoding:
Text File  |  1992-11-16  |  2.0 KB  |  41 lines

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