is there a hot key to break an endless loop which is running

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

gremlin4
Newbie
Posts: 9
Joined: Sun Jun 29, 2014 9:16 am

is there a hot key to break an endless loop which is running

Postby gremlin4 » Fri Jul 11, 2014 8:11 am

OK I'm a bit rusty, haven't used qb seriously for about 10 years and I've just turned 80
My question is:- If, in programming in Windows XP and QB, if I inadvertently insert an endless loop into my code and run it before I find out that it is endless, what can I do to stop execution WITHOUT losing the program status wot I've got up till then?

User avatar
burger2227
Veteran
Posts: 2144
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: is there a hot key to break an endless loop which is run

Postby burger2227 » Fri Jul 11, 2014 8:53 am

Just use Ctrl + break to stop the program. Closing the window may close the QB IDE.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : http://www.QB64.NET
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0

gremlin4
Newbie
Posts: 9
Joined: Sun Jun 29, 2014 9:16 am

Re: is there a hot key to break an endless loop which is run

Postby gremlin4 » Fri Jul 11, 2014 2:46 pm

OK, thanks a million, but, my keyboard (106 keys? seems a lot but i counted them twice)was made in china, has keys labelled in a sort of spanish shorthand.
CTRL I can find, but 'break' not.

User avatar
burger2227
Veteran
Posts: 2144
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: is there a hot key to break an endless loop which is run

Postby burger2227 » Fri Jul 11, 2014 3:49 pm

LOL, my Dell keyboard doesn't either! Look for the Pause/Break button next to Scroll Lock.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : http://www.QB64.NET
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0

gremlin4
Newbie
Posts: 9
Joined: Sun Jun 29, 2014 9:16 am

Re: is there a hot key to break an endless loop which is run

Postby gremlin4 » Fri Jul 11, 2014 4:06 pm

Bingo! I'm much indebted
ed

gremlin4
Newbie
Posts: 9
Joined: Sun Jun 29, 2014 9:16 am

Re: is there a hot key to break an endless loop which is run

Postby gremlin4 » Sat Jul 12, 2014 6:44 am

This page doesn't give me the option to unsubscribe

User avatar
burger2227
Veteran
Posts: 2144
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: is there a hot key to break an endless loop which is run

Postby burger2227 » Sat Jul 12, 2014 8:28 am

Unsubscribe from what?

Uncheck Notify me when a reply is posted box if you don't want notifications.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : http://www.QB64.NET
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0

User avatar
michealey
Coder
Posts: 11
Joined: Sun Dec 03, 2006 8:31 pm
Location: Florida
Contact:

Re: is there a hot key to break an endless loop which is run

Postby michealey » Thu Sep 11, 2014 7:28 am

One point I would like to append to this thread - is that if you are running QBASIC in DOSbox, the CTRL+Break does NOT work. However, there is a simple work-a-round. You can simply use CTRL+SCROLL LOCK - this performs the exact same function. :)

FYI

W6UHQ
Newbie
Posts: 1
Joined: Sat Apr 08, 2017 7:51 pm

Re: is there a hot key to break an endless loop which is running

Postby W6UHQ » Mon Apr 10, 2017 3:45 pm

Hey, help another old guy out.. I'm with Gremlin4.... I've been in the trenches with COBOL, Assembler, FORTRAN etc.... and just a bit
of application programming with BASIC.... and I always (and probably always will) find that I have built me a cute little, tight, endless loop.
Most notable was going to top of page on a 1403 printer doing statements... ohhh, that was a fast printer... my question (beating a dead horse),
how can I get a QB64 program running under Win 10 to terminate... CTRL BREAK doesn't work, Control Scroll Lock doesn't work... (no such key on my Logitech K360 wireless keyboard).... however, the Windows famous "Nuclear Option" of terminating a running program works... a bit
of overkill.... was there updates on this subject?

Regards
Dennis/W6UHQ
Herald, CA


Return to “QBASIC and QB64 Questions & Answers”

Who is online

Users browsing this forum: Google [Bot] and 6 guests