1

我有 Pari/GP 32 位,并希望实现任何类型的代码,这些代码在有限的时间内运行,如果到那时没有产生任何东西,则自动停止。这是一个伪代码示例:

command
...
run command
if run time over 3 minutes
automatically interrupt the program and stop running

我知道有一种基本的方法可以做到这一点,但我从未在 PARI/GP 指南中找到它。有什么帮助吗?谢谢。

4

1 回答 1

2
 alarm(5);for(i=1,10^10,continue)
于 2018-05-15T21:59:08.770 回答