🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #22

Re: executing from within a

#22
From: Andrew Berg
Date: Tue, 03 Nov 1992 19:12
45 lines
1937 bytes
Narti Kitiyakara (Narti.Kitiyakara@f1.n396.z1.fidonet.org) wrote:
: 
:  -=> 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.

--

andrewb@cs.washington.ed
Technical Details
Message-ID: <1992Nov3.191226.722@beaver.cs.washington.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!uw-beaver!lynx.cs.washington.edu!andrewb
References: <14804.2AF59530@puddle.fidonet.org>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!uw-beaver!lynx.cs.washington.edu!andrewb
From: andrewb@lynx.cs.washington.edu (Andrew Berg)
Subject: Re: executing from within a
Message-ID: <1992Nov3.191226.722@beaver.cs.washington.edu>
Sender: news@beaver.cs.washington.edu (USENET News System)
Organization: Computer Science & Engineering Dept., Univ. of Washington, Seattle
X-Newsreader: TIN [version 1.1 PL6]
References: <14804.2AF59530@puddle.fidonet.org>
Date: Tue, 3 Nov 92 19:12:26 GMT
Lines: 45