how to use debugger with proc tht returns nothin !!

hi all...i want to write a procedure just to execute a set of maple commands without any input args e.g do some calc and plot series of graphs..i am facing 2 problems

1.inside procedure all lines are not  displayd only last line of command inside the proc is diplayed after execution

2.im choosing a proc to exec a series of commands because i can use the debugger to debug the set of codes else i cannot.

IS THERE A WAY BY WHICH I CAN USE DEBUGGER WITH OR WITHOUT USING PROC TO EXEC A SET OF CODES THAT WILL NOT TAKE IN ANY ARGS BUT WILL HAVE TO DISPLAY EACH CMD INSIDE THE PROC.

thanks.

Axel Vogt's picture

desperate? post your sheet

Most likely somebody may guide you (even if writing in normal style ... stumbling into new is always a bit of pain, do not give up) if you upload your problem

procedure with commands

Just put the commands in a procedure with no arguments - use print to force output of the individual commands. This can be used with the debugger, e.g.,

dothem:=proc()
   print(plot(x^2,x=0..2));
   print("Yo ho ho");
   DEBUG();
   print(int(sin(x),x=0..Pi));
end proc;

(the last "print" is redundant). To invoke it:

dothem();

i got it !!

thank you professor !!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}