I know that it's probably something really easy, but here's the code:
Code:
I am getting a domain error on line 8 (Output(B,A,"X")), but I don't understand what could possibly be wrong. This is supposed to put an X on the screen with everything else Os and allow you to move it around with the arrows. I would really appreciate some help on this!
Code:
ClrHome
1->A
1->B
0->K
For(B,1,10)
Output(B,1,"OOOOOOOOOOOOOOOOOOOOOOOOOO")
End
Output(B,A,"X")
Repeat 1=0
getKey->K
If not(K=0)
Then
If K=25 and not(B=1) //up
Then
Output(B,A,"O")
B+1->B
Output(B,A,"X")
End
If K=26 and not(A=26) //left
Then
Output(B,A,"O")
A+1->A
Output(B,A,"X")
End
If K=24 and not(A=1) //right
Then
Output(B,A,"O")
A-1->A
Output(B,A,"X")
End
If K=34 and not(B=10) //down
Then
Output(B,A,"O")
B-1->B
Output(B,A,"X")
End
If K=23 //del
Then
ClrHome
Stop
End
End
End
I am getting a domain error on line 8 (Output(B,A,"X")), but I don't understand what could possibly be wrong. This is supposed to put an X on the screen with everything else Os and allow you to move it around with the arrows. I would really appreciate some help on this!