basic program in input loop

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
ds123
Drutt
Posts: 4
Joined: Wed Oct 25, 2023 2:24 pm

basic program in input loop

Post by ds123 »

I am using spectaculator emulator and looped my INKEY$ with GOTO and now cannot exit from the program with the BREAK command.

Is there any other way to exit the input and return to the program listing?
User avatar
PeterJ
Site Admin
Posts: 6882
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: basic program in input loop

Post by PeterJ »

@ds123,

Hold down left shift + space bar
ds123
Drutt
Posts: 4
Joined: Wed Oct 25, 2023 2:24 pm

Re: basic program in input loop

Post by ds123 »

I think because it is waiting for user input that will not work.
User avatar
PeterJ
Site Admin
Posts: 6882
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: basic program in input loop

Post by PeterJ »

ds123 wrote: Wed Oct 25, 2023 3:56 pm I think because it is waiting for user input that will not work.
OK, so you have two double quotes?

If so, delete both double quotes, then enter the keyword STOP (Symbol Shift + A) and hit enter. That will get you back to BASIC
ds123
Drutt
Posts: 4
Joined: Wed Oct 25, 2023 2:24 pm

Re: basic program in input loop

Post by ds123 »

Thanks, it worked!
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: basic program in input loop

Post by 1024MAK »

So you used something like:

10 INPUT A$
20 GO TO 10

rather than:

10 LET A$=INKEY$
20 GO TO 10

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
Post Reply