Run this

by

Run the version of your program below

1) press Down until you get down max

2) press Right for 3-4 columns

3) Press UP several times

If this skips two as you describe, something is bad wrong with your QBasic.EXE.  Let us know.

If it works perfectly, as it does for me, I don't know why. The program is exactly yours, just fixed to have a nice exit (the ESC key). You should always have an exit. ESC is usually the best choice.

Mac

DECLARE SUB getkey ()
DECLARE SUB showcode ()
CLS
DIM SHARED code$(1000), display, over, k$, movedown
display = 21
over = 50
movedown = 1
k$ = INKEY$
DO WHILE k$ <> CHR$(27)
  getkey ' this sub gets user input and outputs it correctly
  k$ = INKEY$ ' storing the INPUT into the variable K
LOOP
LOCATE 19, 1: PRINT SPACE$(240);
LOCATE 20, 1: LINE INPUT "Press Enter to Exit (I love that)"; e$
SYSTEM

SUB getkey
SELECT CASE k$ ' menu selection for user input (K)
CASE CHR$(0) + CHR$(77) ' USER ENTERS RIGHT
  IF over < 80 THEN
    over = over + 1
    LOCATE movedown, over: PRINT "X"
  END IF
CASE CHR$(0) + CHR$(75) ' USER ENTERS LEFT
  IF over > 9 THEN
    over = over - 1
    LOCATE movedown, over: PRINT "X"
  END IF
CASE CHR$(0) + CHR$(80) ' USER ENTERS DOWN
  IF movedown < 21 THEN
    movedown = movedown + 1
    LOCATE movedown, over: PRINT "X"
  END IF
CASE CHR$(0) + CHR$(72) ' USER ENTERS UP
  IF movedown > 3 THEN
    movedown = movedown - 1
    LOCATE movedown, over: PRINT "X" ' this is the part that is broken, i think
  END IF
END SELECT
END SUB

SUB showcode ' JUST IGNORE, IDKK WHAT I WANT THIS TO DO, YET
position = 1
FOR A = display - 20 TO display
  position = position + 1
  IF A < 10 THEN LOCATE position, 1: PRINT A; " : "
  IF A > 9 AND A < 100 THEN LOCATE position, 1: PRINT A; " : ";
  IF A > 99 THEN LOCATE position, 1: PRINT position; " : ";
  LOCATE position, 9: PRINT code$(A)
NEXT A
END SUB

 

Posted on Mar 19, 2008, 3:00 PM
from IP address 68.100.95.143

Respond to this message   

Goto Forum Home


Response TitleAuthor and Date
* Yeah, MAC.. I guess my EXE is broken. I did everything you told me, and it still skipsdrew on Mar 19
 * Nope, Just downloaded 1.0 from the DOWNLOAD section.. Still skips! =[drew on Mar 19