Hi. How do I in (Q)BASIC make a Boolean switch?
So if I press enter on the keyboard, it will do this event - when I press enter on the keyboard again, it will do this event.
Basically I want a stop and go button which is enter.
Thanks.
DOS QBASIC Keyboard Boolean
Moderator: Moderators
-
Haunted360
- Posts: 1000
- Joined: Sat Jan 30, 2010 12:22 am
- PSN Username: Haunted360
- 360 GamerTag: Haunted 360
- Location: Australia
- Contact:
-
Haunted360
- Posts: 1000
- Joined: Sat Jan 30, 2010 12:22 am
- PSN Username: Haunted360
- 360 GamerTag: Haunted 360
- Location: Australia
- Contact:
Re: DOS QBASIC Keyboard Boolean
Never mind, I got it...
Not the best way to do it, but it works......
Was tested in QBASIC for DOS......
Code: Select all
DO
A$ = INKEY$
IF A$ = CHR$(13) THEN GOTO 5 ELSE GOTO 2
REM ... CODE TO BE ACTIVATED ...
LOOP UNTIL A$ = CHR$(13)
Was tested in QBASIC for DOS......