HP Prime programming problem: PRINT command stops working
|
08-10-2018, 12:03 PM
Post: #1
|
|||
|
|||
HP Prime programming problem: PRINT command stops working
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? |
|||
08-10-2018, 12:33 PM
(This post was last modified: 08-10-2018 12:42 PM by Tim Wessman.)
Post: #2
|
|||
|
|||
RE: HP Prime programming problem: PRINT command stops working
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. TW Although I work for HP, the views and opinions I post here are my own. |
|||
08-10-2018, 01:13 PM
Post: #3
|
|||
|
|||
RE: HP Prime programming problem: PRINT command stops working
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 |
|||
08-12-2018, 06:57 PM
Post: #4
|
|||
|
|||
RE: HP Prime programming problem: PRINT command stops working
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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)