HP Forums
How to use HALT( ) ? - 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: How to use HALT( ) ? (/thread-483.html)



How to use HALT( ) ? - eried - 01-21-2014 02:56 AM

It seems to do nothing, either in normal run/debug-> cont

Code:
EXPORT test()
BEGIN

local start:=TICKS;
    local xx;
    for xx from 1 to 100000 do
        halt();
     end;
     msgbox("took: " + (TICKS-start));
END;



RE: How to use HALT( ) ? - Tim Wessman - 01-21-2014 04:01 AM

I believe it is only inside CAS functions that it does anything.


RE: How to use HALT( ) ? - eried - 01-21-2014 07:12 AM

Hi, is this by design? The debugger really needs this or any way to place breakpoints, otherwise it is a real pain to debug something above the hundreds lines.


RE: How to use HALT( ) ? - Tim Wessman - 01-21-2014 04:48 PM

Add debug() to the line you'd like to stop at. There was a reason why the halt command from the cas had to be left in, but I am not remembering what it was right now.


RE: How to use HALT( ) ? - eried - 01-21-2014 05:13 PM

(01-21-2014 04:48 PM)Tim Wessman Wrote:  Add debug() to the line you'd like to stop at. There was a reason why the halt command from the cas had to be left in, but I am not remembering what it was right now.

Great! thanks a lot (debug in the help seems to be just to ran programs)