Post Reply 
KILL command.
01-23-2017, 04:58 PM
Post: #9
RE: KILL command.
I think I understand now. First, are you using the connectivity kit to develop your program? If so, please copy and paste your code between the # tags on the forum editor (top right side). That will make it much easier for people to cut and paste your code.

You could make a subroutine for the code shown, and call it from a REPEAT END or WHILE END loop in an earlier part of your program. Instead of KILL, you would use RETURN.

I could also suggest that you use the drawmenu facility to create a front-end processor for your program (I hope you find this useful):

Code:

// Subroutine declaration
subr();clrscrn();
LOCAL a_string, blue:=rgb(0,0,255);   // Local to main and subroutines
EXPORT menu()
BEGIN
  LOCAL m,m1,mx,my; // Mouse vars
  clrscrn;
  //Main loop 
  While 1 DO
    WHILE MOUSE(1)>=0 DO END;  // get mouse XY coordinates
    //Selection loop
    REPEAT
      m:=MOUSE;
      m1:=m(1);
    UNTIL SIZE(m1)>0;      
    mx:=m1(1);
    my:=m1(2);  
    // query softbuttons
    IF my>=220 AND my<=239 THEN
      // "Btn1" Menu button 1      
      IF mx>=0 AND mx<=51 THEN
        clrscrn;
        subr;
        clrscrn; 
        TEXTOUT_P(a_string, 160-(9*SIZE(a_string)/2),110,7,blue);
      END;  //"Btn1" Btn 1
      // "Btn2" Menu button 2 
      IF mx>=53 AND mx<=104 THEN
      END;  //  "Btn2" btn 2
      // "Btn3" Menu button 3 
      IF mx>=106 AND mx<=157 THEN
      END;    //  "Btn3" btn 3    
      // "Btn" menu button 4
      IF mx>=159 AND mx<=210 THEN              
      END;   //  "Btn4" btn 4
      //"Btn5" menu button 5
      IF mx>=212 AND mx<=263 THEN       
      END;   //  "Match" btn 5
      // menu button 6 Exit
      IF mx>=265 AND mx<=316 THEN
        RETURN "Exit" ;
      END;   //  Menu btn 6      
    END;  // Selection loop  
  END;  // Main loop
END;  // program
//  =========================================  SUBROUTINES HERE  ====================================
clrscrn()
BEGIN
  RECT();           // Clear Screen
  DRAWMENU("FRANCE","Btn2","Btn3","Btn4","Btn5","Exit");     // Menu labels
END;
// ===========================================================================​=======================
// ====================================== END OF clrscrn Subroutine =================================
subr()
BEGIN
  a_string:="Vive la France";
  RETURN a_string;
END;
// ===========================================================================​=======================
// ====================================== END OF subr Subroutine ====================================
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
KILL command. - ggauny@live.fr - 01-14-2017, 12:18 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 10:56 AM
RE: KILL command. - DrD - 01-23-2017, 01:44 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 02:11 PM
RE: KILL command. - DrD - 01-23-2017, 03:21 PM
RE: KILL command. - Han - 01-23-2017, 03:32 PM
RE: KILL command. - Tim Wessman - 01-23-2017, 03:44 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 03:59 PM
RE: KILL command. - DrD - 01-23-2017 04:58 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 07:13 PM
RE: KILL command. - DrD - 01-23-2017, 07:26 PM



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