HP Forums
KILL command. - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: KILL command. (/thread-7570.html)

KILL command. - ggauny@live.fr - 01-14-2017 12:18 PM


Why have-I this message (see attachement please), when I am using KILL in a program ?

And what it's means ?

RE: KILL command. - ggauny@live.fr - 01-23-2017 10:56 AM

I had forgotten that was discuss in a old thread from 2015,0929 but I wonder why
this error text in french language still remain in FW 10638 ?

BTW what about a *STOP* instruction ?

RE: KILL command. - DrD - 01-23-2017 01:44 PM

The KILL; command stops a program, (the BREAK; command exits from a loop). What else would you want a STOP command to do?

RE: KILL command. - ggauny@live.fr - 01-23-2017 02:11 PM

I would like a command without any string as we see in the attachement. A kind of *GOTO*. And also that the issue in language is corrected. I know it is not very important but...

Thanks for answer.

RE: KILL command. - DrD - 01-23-2017 03:21 PM

Quote:A kind of *GOTO*.

How does a STOP command work as a GOTO branch?
How would stopping a program with STOP be any different than with the KILL command, which stops a program?

If you want progress inspection at a STOP point, using the DEBUG; statement at the point of interest, or use DEBUG <filename> provides break point, single step, and variable inspection functionality.
You could add numbered trace variables at various points in a program, then stop by testing: IF (trace==xxxx) THEN KILL; END; or similar code.

What else would a STOP command need to do?

RE: KILL command. - Han - 01-23-2017 03:32 PM

Regarding the strange symbols:

Normally, the message (in English) should say: "<name of program> Program interrupted" when run from the Programs menu. When run from the command line, one simply gets the error message "Program interrupted."

It is quite possible that the system messages for interrupting a program have not been translated properly.

EDIT: I just changed my language to Francais and indeed I see the same symbols. It looks like a bug (wrong translation) in the system strings for French.

RE: KILL command. - Tim Wessman - 01-23-2017 03:44 PM

So this highlights one of the frustrations in dealing with translations...

Basically, this WAS corrected, but later during a subsequent translation the "translation matrix" matched the string to an older "validated translation" and reverted it. I've corrected it yet again and hopefully it will stick this time.

RE: KILL command. - ggauny@live.fr - 01-23-2017 03:59 PM

Thak Team and others. I dont' realy explain what I would like. Impossible with my english ! I try : when my test say that there is an mistake, I would like *stop" the program with out any comment and after my text of error I would like go back to my program.

In attachement I would like that after my MSGBOX is display, that KILL stop my programme and go back to TSTDate for re-asking where was the mistake.

RE: KILL command. - DrD - 01-23-2017 04:58 PM

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):


// Subroutine declaration
LOCAL a_string, blue:=rgb(0,0,255);   // Local to main and subroutines
EXPORT menu()
  LOCAL m,m1,mx,my; // Mouse vars
  //Main loop 
  While 1 DO
    WHILE MOUSE(1)>=0 DO END;  // get mouse XY coordinates
    //Selection loop
    UNTIL SIZE(m1)>0;      
    // query softbuttons
    IF my>=220 AND my<=239 THEN
      // "Btn1" Menu button 1      
      IF mx>=0 AND mx<=51 THEN
        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  ====================================
  RECT();           // Clear Screen
  DRAWMENU("FRANCE","Btn2","Btn3","Btn4","Btn5","Exit");     // Menu labels
// ===========================================================================​=======================
// ====================================== END OF clrscrn Subroutine =================================
  a_string:="Vive la France";
  RETURN a_string;
// ===========================================================================​=======================
// ====================================== END OF subr Subroutine ====================================

RE: KILL command. - ggauny@live.fr - 01-23-2017 07:13 PM

Thank DrD !

Double thank for the "Vive la France". I give my program for you see. I will studie
your code for me programing. It is of course a good idea and loops you sugest and what I dont' have my way to did.


  IF J*M*A==0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF J<1 OR J>31 OR FP(J)≠0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF M<1 OR M>12 OR FP(M)≠0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF A<−4712 OR A>9999 OR FP(A) ≠ 0 OR A=0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF M==04 OR M==06 OR M==09 OR M==11 AND J>30 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END; 

IF A==1582 THEN
TST:=A+M/100+J/10000 ELSE END;

IF (A==1582 AND (TST>1582.1004
AND TST<1582.1015)) 
THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

IF A MOD 4==0 AND(A MOD 400==0
   OR A MOD 100≠0)

IF A MOD 4==0 AND A<1582 

IF M==2 AND BISS==1 
  AND J>29 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

   AND J>28 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

MSGBOX("Date OK");

RE: KILL command. - DrD - 01-23-2017 07:26 PM

You're very welcome. I use that framework a lot, and I hope it might be of use for you. Being able to select activities via soft keys can be very efficient. So good luck ...