Bill Allombert on Mon, 13 Feb 2012 00:20:22 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]


Dear PARI developers,

We have discussed the implementation of a breakpoint in GP.
In its simplest form the implementation is as follow:
void pari_breakpoint(void) { cb_pari_sigint(); }
and the relevant file in src/functions/programming.

You insert a call to breakpoint() somewhere in your GP program, and when reached,
this simulate a SIGINT (control-C) which cause GP to enter the breakloop and
allow you to inspect the state of the program, and allow you to quit the breakloop
and continue to run the program.

There are several questions:
1) Should we enter the breakloop when default(breakloop) is 0 ?
2) Should we make it a GP specific feature (on the ground that other PARI shells
do not implement the breakloop) ?

3) Is the interface too limited ? Should we extend it ?

Maybe we should allow:
breakpoint(x): only stop if x is true.
but this is not much nicer than if(x,breakpoint()).