Bill Allombert on Tue, 07 Feb 2012 22:54:51 +0100


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

GENtoGENstr and GP2C


Dear PARI developers,

Andreas found this problem with gp2c with PARI 2.5:

l(x)=write(x,1)
...gp2c-run...
? l("pari")
creates a file named "pari" _with_ the surrounding quotes. This worked correctly
with PARI 2.3.5.  This occurs with functions using the 's' prototype code.
GP itself uses the following code to handle them:

  if (typ(z)!=t_STR)
    z = GENtoGENstr(z);
  return GSTR(z);

But this not entirely practical for gp2c. It would need to do:

write0(GSTR(typ(x)==t_STR?x:GENtoGENstr(x)), mkvec(gen_1));

Cheers,
Bill.