I have a Linux PC (Ubuntu) where I installed PARI/GP from the command line (when you type gp
in a shell, it says the program is not there but gives you a command you can use to get it all installed), and then I have a Windows machine where I installed PARI/GP through the self-installing distribution (.exe
) from the PARI/GP home page.
I noticed a difference in the behavior when I interrupt a function call with Ctrl+C
(or Ctrl+Break
). In the Linux version, it comes up with a message like:
*** user interrupt after 358 ms
*** Break loop: <Return> to continue; 'break' to go back to GP prompt
and it allows me to inspect local variables (whose scopes were limited to within the function that was terminated), such as loop variables. However, on my Windows machine it leaves the function completely and goes out to the usual prompt, and there is no way I can see what the state of everything was like just before I pressed Ctrl+C
.
For a contrived example, with code like:
for(i=1,10^30,if(ispseudoprime(i^i+1),print(i)))
on the Ubuntu system, I can break and check the current size of i
and then decide to either stop or go on, while on the other machine, that is not possible.
Why is there this difference between the two installations, and is this something I can configure myself?