Board Thread:Questions and Answers/@comment-74.139.88.16-20140108203004/@comment-9531161-20140108213900

FOR I=0 TO 1:I=(BTRIG AND 16):NEXT

Make sure the 0 and TO are separate. Here's a different version. Place this code at the bottom of your program:

@WAIT IF !(BTRIG AND 16) GOTO @WAIT RETURN

Then, make sure that you have an END before the @WAIT section but after all your main code. Finally, when you want to wait, just do:

GOSUB @WAIT

Instead of typing all that FOR loop stuff each time. It's a little more involved, but it's much shorter if you need to wait more than once. Here's an example:

INPUT NAME$ PRINT "Hello, " NAME$ "!" GOSUB @WAIT PRINT "Well, there's one more thing to do..." GOSUB @WAIT PRINT "Just kidding! That's the end!" END

@WAIT IF !(BTRIG AND 16) GOTO @WAIT RETURN