HP Forums
HP Prime programming problem: PRINT command stops working - 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: HP Prime programming problem: PRINT command stops working (/thread-11197.html)



HP Prime programming problem: PRINT command stops working - Jenab6 - 08-10-2018 12:03 PM

I was programming an orbit determination code into my HP Prime. It uses the method of Gauss to find orbital elements using angle-only input for the other planet and heliocentric position vectors for Earth.

Anyway, I was debugging by doing PRINT output after every block of calculations, to make sure that my answers matched the ones in a book I'm using. After about line 160, the print command stopped working. It didn't throw an error, but it wouldn't execute, either. I got a last line of output from a program run, and then after that line none of the later Print lines did anything.

Is this a known bug? Is there a way to fix it?


RE: HP Prime programming problem: PRINT command stops working - Tim Wessman - 08-10-2018 12:33 PM

There is limited space. Clear out old lines. PRINT() clears.

Have you used the built in DEBUG command instead? Then you can single step through, and watch your variables/results directly.

Stick "DEBUG()" in your program where you'd like to start the debugger in the middle if you don't want to start at the beginning.


RE: HP Prime programming problem: PRINT command stops working - compsystems - 08-10-2018 01:13 PM

I think DEBUG does not work with CAS-type programs

An option to the terminal view, is that a command to print in the history view will be incorporated in a next firmware. In addition, the history allows more than 150 lines.

we also hope for a better terminal view

Any options for better interactive terminal-style I/O
http://www.hpmuseum.org/forum/thread-11126.html


RE: HP Prime programming problem: PRINT command stops working - Jenab6 - 08-12-2018 06:57 PM

Problem solved.

Apparently there was a divide-by-zero error in the program execution that stopped all subsequent output by the PRINT command. I wasn't notified about the runtime error, and it was only by going over the code that I found a divisor that was the wrong variable.