嗨,每次我尝试运行以下程序时:
L=-1
OPEN "tty.usbserial-FTG7QLFS:300,N,8,1,CS0,DS" FOR OUTPUT AS #1
WHILE L
J=63
MENU: PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT "WAITING FOR KEYSTROKE COMMAND"
PRINT "TYPE:"
PRINT " C-CLOSE SHUTTER"
PRINT " O-OPEN SHUTTER"
PRINT " R-RESET CONTROL"
PRINT " Q-TERMINATE PROGRAM"
PRINT
PRINT
START:
A$ = INKEY$
IF A$ = "O" THEN
PRINT #1,CHR$(J+1);
PRINT "SHUTTER OPEN COMMAND SENT"
GOSUB TIMEOUT
GOTO MENU
ELSEIF A$ = "C" THEN
PRINT #1,CHR$(J+2);
PRINT "SHUTTER CLOSE COMMAND SENT"
GOSUB TIMEOUT
GOTO MENU
ELSEIF A$ = "R" THE
PRINT #1,CHR$(J+3);
PRINT "CONTROL RESET COMMAND SENT"
GOSUB TIMEOUT
GOTO MENU
ELSEIF A$ = "Q" THEN
L = 0
PRINT "PROGRAM TERMINATED"
ELSE GOTO START
END IF
WEND
END
TIMEOUT: FOR I=1 TO 100:NEXT I
CLS 0
RETURN
我收到以下错误“语法错误,第 6 行中缺少符号”,但在第 6 行只有一个打印语句,所以我无法弄清楚我缺少什么。我在 Mac OS X 上通过 Chipmunk Basic 运行程序。
谢谢