Karim BELABAS on Thu, 26 Jun 2003 20:08:51 +0200 (MEST)


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

Re: .gprc


On Thu, 5 Jun 2003, Ilya Zakharevich wrote:
> > As a rule, I'd rather keep the built-in routine set to a minimum unless
> >
> > * there's a definite use for the new functionality
> > * it's inconvenient to replicate it from within gp.
> >
> > Do you have a definite need for this version array which can't be addressed
> > by the gprc (admittedly quite limited) version handling ?
>
> You want me to insert something like this in gprc:
>
>   if VERSION == 2.2.5 eval(version=[2,2,5])
>   if VERSION == 2.2.6 eval(version=[2,2,6])
>   if VERSION == 2.2.7 eval(version=[2,2,7])

This wouldn't work. Only 'read' and assignment statements are supported in .gprc

> or what?  I do not see how gprc stuff is going to help with choosing
> an algo basing on the version...

I use something like this

  #if VERSION <  2.2.5 read "compat-stuff"
  #if VERSION >= 2.2.5 read "fancy-stuff"

[ there's no #else ... ]

Granted, it's not as powerful as pari_version() would be.

    Karim.
-- 
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425   Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://www.parigp-home.de/  [PARI/GP]