Author Topic: Is it a bug or an attribute?  (Read 2630 times)

0 Members and 1 Guest are viewing this topic.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Is it a bug or an attribute?
« on: August 15, 2018, 02:13:20 pm »
In the new IDE 07-21-2018 I noticed one thing. If I'm writing a program that uses multiple screens and I'm completing the compiled EXE file with CTRL + PAUSE, the EXE remain in memory and will not quit. I need to end it through the Task Manager. As an example, today's Direct Bitmap reader can serve. Open it in IDE, compile, run. If you hit CTRL + PAUSE when the BMP header is listed, this problem will occur. At that time, the program switches between SCREEN 0 and SCREEN _NEWIMAGE by the size it reads from the bitmap head.

FellippeHeitor

  • Guest
Re: Is it a bug or an attribute?
« Reply #1 on: August 15, 2018, 03:10:31 pm »
That's some sort of race condition between the way SLEEP halts your program and the required changes the SCREEN statement will perform.

Replace SLEEP with:
Code: QB64: [Select]
  1. k& = 0
  2.     k& = _KEYHIT: _LIMIT 30