Hallo, guten Tag.
Warum kann ich nicht aus der Schleife springen mit der Taste "A" nach "weiter:"
.....................................................
ende& = 1
While ende&
WaitKey
If %Key = 65
Goto "weiter"
EndIf
GetComInput f&
Sleep 1
Print wert&
EndWhile
weiter:
...........................
Code
$MAKE CLE
declare bpic&
declare x&,y&,z&,z1&,f&,wert&,bit&,ende&
Window 20,20-800,600
Cls RGB(220,220,220)
bpic& = create("hNewPic", 320,200,rgb(255,255,255))
f& = OpenCom("COM2", 1024, 1024)
SetCom("COM2:2400,N,8,1")
drawpic bpic&,30,30;0
ende& = 1
While ende&
WaitKey
If %Key = 65
Goto "weiter"
EndIf
GetComInput f&
Sleep 1
Print wert&
EndWhile
weiter:
WhileLoop 0,199,8
z1&=&loop
WhileLoop 0,319,8
z&=&loop
WhileLoop 0,7
y&=&loop
WhileLoop 7,0,-1
wert&=129
bit&=TestBit(wert&,&loop)
If bit&=1
startpaint bpic&
SetPixel &loop+z&,y&+z1&,0
EndPaint
EndIf
drawpic bpic&,30,30;0
EndWhile
EndWhile
EndWhile
EndWhile
WaitKey
CloseCom(f%)
end
Proc GetComInput
Parameters id&
Declare x$
x$=""
x$ = ReadCom$(id&,1)
If Len (x$)>0
wert&=Ord(x$)
EndIf
EndProc
Alles anzeigen