Karim Belabas on Thu, 21 Nov 2013 18:06:54 +0100

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

Re: Function vs list of instructions executed separately

* Ewan Delanoy [2013-11-21 17:54]:
>  recently I’ve encountered a strange situation where it seems a
>  function renders a different output than the output obtained when
>  each of its instructions are executed separately. About a year ago I
>  has asked this list for help on a similar matter, and it turned out
>  (fortunately) to be just a typo issue in function names. But this
>  time I’ve re-read the code several times and it’s still a mystery to  me

1) You almost certainly want to use my() and not local()

2) If this does not fix the problem, can you send the whole script
script to me, I'd like to be able to run all commands :-)


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/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]