executing from within a 
Author Message
 executing from within a

 -=> Quoting Ronald Roosemeyers to All <=-

 RR> I use Topspeed modula 3.1 and had a problem in my last
 RR> program. Does anyone know how Ii can execute another
 RR> program from a modula program so that this modula program
 RR> is removed from memory (the program is stopped and so may
 RR> be removed from memory). This program is a menusystem that
 RR> executes other programs. If i choose a program the program
 RR> must execute it and remove the modula program. Thus the
 RR> problem is how i can do this !! Please answer if you know
 RR> it. Very much obliged...

     I don't know anything about the Topspeed compiler, but from
 an MS-DOS point of view you can't do it.  The best you could
 do is put most of your code in an overlay and unload it before
 you call another DOS program.  (I don't know if this can be
 done with Topspeed.)

                                        - Narti

___ Blue Wave/QWK v2.10

--  
uucp: uunet!m2xenix!puddle!396!1!Narti.Kitiyakara



Fri, 21 Apr 1995 05:30:02 GMT  
 executing from within a
:
:  -=> Quoting Ronald Roosemeyers to All <=-
:
:  RR> I use Topspeed modula 3.1 and had a problem in my last
:  RR> program. Does anyone know how Ii can execute another
:  RR> program from a modula program so that this modula program
:  RR> is removed from memory (the program is stopped and so may
:  RR> be removed from memory). This program is a menusystem that
:  RR> executes other programs. If i choose a program the program
:  RR> must execute it and remove the modula program. Thus the
:  RR> problem is how i can do this !! Please answer if you know
:  RR> it. Very much obliged...
:

You might use a fairly unobvious approach (and a little slow), but
much more compatible than using the DOS EXEC function:

call your program from a batch file.  Call this batch file Menu and
make it read:

        my_menu.exe
        menu_go.bat

Then your program has to write menu_go.bat to read something like:

        c:
        cd \a\direct.ory
        aprogram.exe
        .
        .
        .
        cd \menu
        menu.bat

This batch file will be made differently depending on the selection
from the menu.

One noteworthy advantage for this is that it use exactly 0k memory,
and the program will be being called from DOS's COMMAND.COM so there
is approximately zero oppurtunity for compatiblity confilcts.

--




Sun, 23 Apr 1995 03:12:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Executing from within a M

2. executing from within a modula-program

3. executing a shell command within AWK

4. Executing Sql code on Sybase from within VW

5. executing block at toplevel from within a class

6. executing a file from within a program

7. executing dos program within program

8. Executing an external program from within a TSR

9. Executing an external program from within a TSR

10. executing a script within another one & paths

11. Executing a DOS command within MS Fortran V5.1

12. Q: Executing programs from within a program

 

 
Powered by phpBB® Forum Software