Post Reply 
Output from WAIT(-1)
01-09-2021, 06:14 PM (This post was last modified: 01-09-2021 06:16 PM by cahlucas.)
Post: #5
RE: Output from WAIT(-1)
Dear Mr. Horn,
So code as shown below should work fine. Please let me know if anything is wrong or if something needs to be inserted. I hope to hear from you soon. Sincerely, Karel.
Code:

...
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==19 THEN exit:=1;  END;
        ...
        IF input==50 THEN ...  END;
     END;
  END;
END;
...
UNTIL exit;
...

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
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) - cahlucas - 01-09-2021, 09:36 PM



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