Bill Allombert on Thu, 18 Dec 2003 16:49:26 +0100


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

built-in functions in GP


Hello PARI-dev,

some functions are still built-in the GP program:

allocatemem, default, extern, input, quit, read, system, whatnow

Either they should be move to libpari, or an equivalent pari
function need to be provided and added in the description:
Also the semantic might be different for stand-alone programs
and GP installed() plug-in which can be problematic.

1) extern,system,read: should really be in libpari.

2) default: should be in libpari, some default are only relevant to GP.

3) allocatemem: allocatemem0 is called but allocatemoremem() is
available. Probably using allocatemoremem() with gp2c-run will crash
GP, however.

4) quit: a libpari way to shutdown pari should be provided and added to
the library. That was already discussed in 
<http://pari.math.u-bordeaux.fr/archives/pari-users-0301/msg00020.html>.
With gp2c-run this is likely to crash PARI.

5) input: require input support which is not present in libpari.

6) whatnow: probably don't worth the trouble. It is a line-editing
command and should be handled as such.

Probably the nicest way to fix 3,4,5) is to have default implementation
of these functions in libpari and provide a way for the stand-alone
program (including GP) to override them.

Cheers,
Bill.