Karim Belabas on Wed, 01 Feb 2012 08:29:29 +0100

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

Re: getenv and Strexpand

* Bill Allombert [2012-01-31 20:58]:
> Dear PARI developers,
> Recently I have added a function getenv() to GP.  However I see now that it was
> not needed since Strexpand() does the job. 

They are not entirely equivalent: you cannot distinguish between a
non-existent environment variable and one which has value "" using

Also although you probably expect Strexpand'd current behaviour when
"expanding" character strings, it is probably not obvious to find this
function when you're only looking for environment variables. 'getenv' is
what I would look for first :-)

N.B. Not obvious but too hard either:
(08:22) gp > ???environment
Strexpand getenv    logfile   path      psfile    

> So maybe we should remove getenv(), and instead add a pointer to
> Strexpand() instead.

Where do you want to add a pointer to Strexpand() ? [ in various places
in the documentation ? ]

Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]