Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exiting to DOS 1

Status
Not open for further replies.

skyguy

Technical User
Mar 18, 2000
1
US
When making a program, is there a command that can exit to DOS and not the QBasic shell?
 
I hate to say this but, I don't think you can do that using only Qbasic. The compiled apps of the full versions (4.5, 7.0 PDS, Power Basic, etc.) exit to the command line when finished. Straight Qbasic is intended to run as an interpreter.<br>
<br>
I have the debug code for a short keyboard loader (somewhere) that could terminate Qbasic if you do a SHELL(&quot;QuitQB&quot;) command. I'll post it here if I can find it.<br>
<br>
<p> <br><a href=mailto: > </a><br><a href= Vorpalcom home page</a><br>Send me suggestions or comments on my current software project.
 
It is possible to run DOS inside of QBASIC... could that be a solution? Are you using DOS in your program, or are you just interested in terminating QBASIC as well as the program when it's done? You can't have QBASIC exit itself as far as I know, but if you want to run DOS inside of QBASIC, that can be done, I'm pretty sure... <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
 
if you start your program by:<br>QBASIC /RUN program.bas<br>you can exit to dos by using the SYSTEM statement.
 
I would write a batch file that goes like this:<br><br><FONT FACE=monospace><br>@qbasic /run program.bas<br></font><br><br>Then have SYSTEM at the end of the program.&nbsp;&nbsp;This way, your user will be able to just run the batch file and everything is taken care of.
 
Good one, Rogue2! For some reason I thought the SYSTEM command didn't become available until QB 4. Thanks for reminding us that in works quite well in Qbasic.<br><br>&lt;grumble&gt; I must be getting old. &lt;grumble&gt;<br> <p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top