HP Forums
Prime: Debug with Parameters - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Prime: Debug with Parameters (/thread-252057.html)



Prime: Debug with Parameters - Helge Gabert - 10-03-2013

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.


Re: Prime: Debug with Parameters - Han - 10-03-2013

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]))



Re: Prime: Debug with Parameters - Helge Gabert - 10-03-2013

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]).




Re: Prime: Debug with Parameters - Han - 10-03-2013

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.


Re: Prime: Debug with Parameters - Helge Gabert - 10-03-2013

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.




Re: Prime: Debug with Parameters - Han - 10-03-2013

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...


Re: Prime: Debug with Parameters - Helge Gabert - 10-03-2013

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).




Re: Prime: Debug with Parameters - cyrille de Brébisson - 10-04-2013

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


Re: Prime: Debug with Parameters - Helge Gabert - 10-06-2013

Thank you - - that works!