Post Reply 
Output from WAIT(-1)
01-09-2021, 08:48 PM
Post: #6
RE: Output from WAIT(-1)
This code, derived from yours, works fine.

Are you having problems with your code?

Code:

EXPORT KAREL()
BEGIN

LOCAL input,exit,cx,cy;
exit:=0;

REPEAT
input:= WAIT(-1);
CASE
  IF TYPE(input)==6 THEN
     CASE
        IF input(1)==#0h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
        IF input(1)==#1h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
        IF input(1)==#3h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
        IF input(1)==#5h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
        IF input(1)==#6h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
        IF input(1)==#7h THEN 
          cx:=B→R(input(2));
          cy:=B→R(input(3));
        END;
     END;
  END;
  IF TYPE(input)==0 THEN
     CASE
        IF input==-1 THEN  END;
        IF input==29 THEN exit:=1;  END;
        IF input==50 THEN  END;
     END;
  END;
END;

ARC_P(cx,cy,40);

UNTIL exit;

END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Output from WAIT(-1) - cahlucas - 01-06-2021, 09:57 PM
RE: Output from WAIT(-1) - Joe Horn - 01-07-2021, 04:54 AM
RE: Output from WAIT(-1) - cahlucas - 01-08-2021, 04:55 PM
RE: Output from WAIT(-1) - Joe Horn - 01-08-2021, 10:20 PM
RE: Output from WAIT(-1) - cahlucas - 01-09-2021, 06:14 PM
RE: Output from WAIT(-1) - john gustaf stebbins - 01-09-2021 08:48 PM
RE: Output from WAIT(-1) - cahlucas - 01-09-2021, 09:36 PM



User(s) browsing this thread: 1 Guest(s)