Well, a program should end by itself when it reaches its last line...
If you are asking how to get out off a loop without user's intervention, you must set an end condition, it can be a calculation,a counter or a timeout
Even after you compile a qbasic program, and the program ends, or you end it. The user must press a key for the program to truely end. I would like to stop that.
If you run the program from the IDE (QBASIC or QuickBasic Editor) that will ALWAYS be the case (the prompt to press a key or enter) -- there's nothing you can do about that.
But using QBASIC /RUN progname
will end the program without the prompt if you use SYSTEM
as I suggested before.
If you use a bat file to load the program:
@echo off
c:\(location of qbasic) /run (filename)
then you can just type sytem as the command to exit and it will close it with out the "press any key to continue"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.