Prime: Debug with Parameters



#10

I have a program that expects a vector as a parameter, e.g.,

MYPROGRAM(a)
BEGIN
...
END;

(a is a vector)

I'm wondering how to debug or run my program from the Program Catalog, because the Program Parameter screen which pops up doesn't appear to allow vectors or matrices to be input.

The program runs fine from the command line with the vector as an argument.


#11

Quote:
I have a program that expects a vector as a parameter, e.g.,

MYPROGRAM(a)
BEGIN
...
END;

(a is a vector)

I'm wondering how to debug or run my program from the Program Catalog, because the Program Parameter screen which pops up doesn't appear to allow vectors or matrices to be input.

The program runs fine from the command line with the vector as an argument.


Try:

DEBUG(MYPROGRAM([a,b,c]))

#12

Thanks, Han,

But that doesn't give me the Debug stepping screen for single-stepping through the program. It only runs it (same as MYPROGRAM([a,b,c]).


#13

Quote:
Thanks, Han,

But that doesn't give me the Debug stepping screen for single-stepping through the program. It only runs it (same as MYPROGRAM([a,b,c]).


Did you put any

halt();
commands in the program? I believe it works the same way as the HP48-HP50 in that DEBUG only brings up the interactive debugging interface if you use a halt.

#14

Actually, DEBUG works even without the halt(); in HOME view, though!

I was in CAS view - - there, DEBUG does not seem to have an effect.


#15

Even with halts() placed in it still doesn't work in CAS mode? (I myself have not tried it.) I wonder if CAS programs can be debugged in CAS mode...


#16

Yes that is correct. I does not work, even with halt().

Perhaps they can be debugged if they are parsed within CAS when developed (I just wrote my prgram the "normal" way, in the HOME environment).

#17

Hello,

sorry, can't do it as you want, however, there is a serie of workaround:

in home, do debug(myprogram(params))
in your program, place a single debug; instruction where you want debuging to start (it's a breakpoint basicaly)...

these should allow you to fix the bugs that you might have...

cyrille


#18

Thank you - - that works!


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: problem with the memory of calculator during the debug process? Carlos CM (Mexico) 7 3,545 12-06-2013, 12:34 PM
Last Post: Carlos CM (Mexico)
  Problem with debug HP prime program, somebody help me? Carlos CM (Mexico) 6 3,381 12-05-2013, 03:07 PM
Last Post: Carlos CM (Mexico)
  HP PRIME Function parameters steindid 2 1,460 10-11-2013, 10:20 AM
Last Post: steindid
  Problem with tiny HP-16C program - can you debug this? Richard B 8 2,255 07-07-2008, 01:46 PM
Last Post: Richard B
  debug 4 Chad Wagner 0 656 04-04-2004, 06:59 PM
Last Post: Chad Wagner

Forum Jump: