| mathewes on Fri, 14 Sep 2012 18:02:31 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Fwd: pari error-handing problem |
As the letter I have sent stated, what I want to get is like
try
{
}catch(..)
{
}
when error happened, it will be catched, and I could handle it instead of stopping the program.
----- 转发的邮件 -----
发件人: mathewes@sjtu.edu.cn
收件人: pari-users@pari.math.u-bordeaux1.fr
发送时间: 星期五, 2012年 9 月 14日 下午 11:42:36
主题: pari error-handing problem
Dear Sir or Madam,
I am a new user for PARI. Recently I got some problems with the error-handing when I use the pari lib.
In my GP script code;
trap(,flag=1,1/(d[2]-d[1])*Mod(1,n));
And I use gp2c convert it to C code.
It looks like that:
GEN anon_1(GEN d, GEN n)
{
return gmul(ginv(gsub(gel(d, 2), gel(d, 1))), gmodulsg(1, n));
}
GEN anon_0(GEN flag)
{
return flag = gen_1;
}
trap0("", strtoclosure("anon_0", 1, flag), strtoclosure("anon_1", 2, d, n));
After that I add some other parts for the project.
I get a success when I run the 'make', but when I use ./Filename-dyn, I got a error:
*** no function named "anon_1".
*** Error in the PARI system. End of program.
I got confused about that. Can you help me?
PS: I am not a native speaker for English, so the mail must have some error.
PS: Maybe I had got it that the main use file after 'Make' is to use as a lib, but I wonder if there is some way to use it in native Anscii C + general PARI lib.
Yours,
Tian