HP Forums
Debugger displays unevaluated expressions. - 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: Debugger displays unevaluated expressions. (/thread-881.html)



Debugger displays unevaluated expressions. - Ben Fairbank - 03-10-2014 10:27 PM

When I use Debug or MSGBOX() in the emulator to follow the value of variables in a program I am debugging, instead of values on the screen I see unevaluated expressions, such as:

Maxheight2: 7.3894E-4/(1.0000/3.9600E3). Or (my favorite)
height1 =
1.0000+FLOOR(5.0000+1.55O0e2*(
1.0000-2.2150e-9/(1.0000/3.9600E
3)/(7.3894E-4/(1.0000/3.9600E3)))+
5.0000E-1)

Needless to say, this gets tiresome very quickly and is not much of an aid to debugging. What am I missing? How do I get Debug and MSGBOX() to display values, not formulae?

And as always, Thank You!

Ben


RE: Debugger displays unevaluated expressions. - Ben Fairbank - 03-10-2014 10:35 PM

Aha. Just found how to use eval() to solve that.
Thanks for the bandwidth.
BF


RE: Debugger displays unevaluated expressions. - DrD - 03-10-2014 10:39 PM

Maxheight2: 7.3894E-4/(1.0000/3.9600E3). Or (my favorite)
height1 =
1.0000+FLOOR(5.0000+1.55O0e2*(
1.0000-2.2150e-9/(1.0000/3.9600E
3)/(7.3894E-4/(1.0000/3.9600E3)))+
5.0000E-1)

if your code is using the "=" sign as above, try that again with ":=" like:

height1:=1.0000+FLOOR(5.0000+1.55O0e2*(1.0000-2.2150e-9/(1.0000/3.9600E
3)/(7.3894E-4/(1.0000/3.9600E3)))+
5.0000E-1);


RE: Debugger displays unevaluated expressions. - cyrille de brébisson - 03-11-2014 06:17 AM

Hello,

It is strange that the numbers do not get evaluated by themselfves, you probably have a simple error somewhere that causes it.

If you post your program code, I can have a look at it...

note, do you know that there is a build in debuger?

you can do debug(program) from the command line, OR you can add a debug instruction in your program to create a breakpoint.

Cyrille