Post Reply 
menu programming
09-04-2017, 11:08 AM
Post: #5
RE: menu programming
I found that it executes better if the WAIT call is used instead of MOUSE as in this example...

Code:

EXPORT MBase(A,B,C)
BEGIN
LOCAL men,m,m1,mx,my,s;
// initialize
WHILE MOUSE(1)≥0 DO END;
men:={"","HEX","OCT","DEC","BIN","EXIT"};

REPEAT // MAIN LOOP
PUTMENU(men);

REPEAT // WAIT FOR A MOUSE CLICK
 m:=WAIT(−1);
UNTIL (m(1)==3 OR m(1)==7);
mx:=m(2); my:=m(3);

s:=GETMENU(mx,my,men);
CASE
 IF (s==2) THEN s:=0; PRINT(A); END;
 IF (s==3) THEN s:=0; PRINT(B); END;
 IF (s==4) THEN s:=0; PRINT(C); END;
 DEFAULT
  PRINT();
  PRINT("");
END;

UNTIL (s==6); // REPEAT...

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


Messages In This Thread
menu programming - webmasterpdx - 09-03-2017, 05:25 AM
RE: menu programming - webmasterpdx - 09-03-2017, 06:46 AM
RE: menu programming - primer - 09-03-2017, 05:46 PM
RE: menu programming - webmasterpdx - 09-03-2017, 07:44 PM
RE: menu programming - webmasterpdx - 09-04-2017 11:08 AM



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