Posts: 113
Threads: 20
Joined: Sep 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.
Posts: 709
Threads: 104
Joined: Nov 2005
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]))
Posts: 113
Threads: 20
Joined: Sep 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]).
Posts: 709
Threads: 104
Joined: Nov 2005
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.
Posts: 113
Threads: 20
Joined: Sep 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.
Posts: 709
Threads: 104
Joined: Nov 2005
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...
Posts: 113
Threads: 20
Joined: Sep 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).
Posts: 193
Threads: 10
Joined: Mar 2008
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
Posts: 113
Threads: 20
Joined: Sep 2013
Thank you - - that works!