Karim Belabas on Thu, 15 Dec 2005 15:06:57 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: reading environment variables into gp? |
* John Cremona [2005-12-15 14:57]: > It would be very helpful if a gp script could read the value of a (unix) > environment variable, into a string or integer variable. > > For example, something like > > s=getenv("MY_ENV_VAR"); > > would result in s being a string variable. The C function getenv() does > this, so perhaps it would be simply a question of install-ing it? Have a look at Strexpand > Apologies if this is already possible -- I did look in the manual and > also searched the list archives! (15:03) gp > ???environment Strexpand Cheers, Karim. -- Karim Belabas 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-bordeaux.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]