Author Topic: Can QB64 finish without the screen disappearing  (Read 4401 times)

0 Members and 1 Guest are viewing this topic.

Offline alexpro1ny

  • Newbie
  • Posts: 5
    • View Profile
Can QB64 finish without the screen disappearing
« 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

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Can QB64 finish without the screen disappearing
« Reply #1 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?
« Last Edit: February 23, 2018, 08:36:25 pm by bplus »

FellippeHeitor

  • Guest
Re: Can QB64 finish without the screen disappearing
« Reply #2 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.
« Last Edit: February 23, 2018, 08:31:32 pm by FellippeHeitor »

Offline alexpro1ny

  • Newbie
  • Posts: 5
    • View Profile
Re: Can QB64 finish without the screen disappearing
« Reply #3 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!