QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: alexpro1ny on February 23, 2018, 08:02:19 pm

Title: Can QB64 finish without the screen disappearing
Post by: alexpro1ny on February 23, 2018, 08:02:19 pm
Hi,

In PDS 7.1, you could have your program run, print some lines of text and when done, close and the text would still be visible on your dos screen.  I have a program where it looks for a specific type of error in a text file.  If the error is there, it prints the offending line on the screen and to a log file.  When done, the numbers of errors are printed and the program ends.  I can still see the output while I'm at the dos or cmd prompt.

When I run this program now in QB64, the screen is gone when the program ends.  I have to look at the log file that the program creates in order to see the errors.  Is there any way to not clear the screen other than by putting a pause before it exits?   The program doesn't do any screen formatting.  I'm new to QB64 and just figuring out the differences.

Thanks
Title: Re: Can QB64 finish without the screen disappearing
Post by: bplus on February 23, 2018, 08:24:53 pm
Oh, do you want a screen still showing after a program ends?

I was going to suggest SLEEP but that is a pause before program ends.

After a program ends, OS takes over, maybe work out an arrangement with it?
Title: Re: Can QB64 finish without the screen disappearing
Post by: FellippeHeitor on February 23, 2018, 08:29:38 pm
Your program probably has a call to SYSTEM. Replacing that with END will keep your screen up with "Press any key to continue" or similar. That won't allow you to scroll back in case your output is longer than the screen, though.

You can, however, create a console application and replicate the DOS experience by having your program output to terminal:

Code: QB64: [Select]

Add the snippet above to the beginning of your program.
Title: Re: Can QB64 finish without the screen disappearing
Post by: alexpro1ny on February 24, 2018, 02:54:29 pm
Your program probably has a call to SYSTEM. Replacing that with END will keep your screen up with "Press any key to continue" or similar. That won't allow you to scroll back in case your output is longer than the screen, though.

You can, however, create a console application and replicate the DOS experience by having your program output to terminal:

Code: QB64: [Select]

Add the snippet above to the beginning of your program.

Thank you!  This works great!  Much appreciated!