Re: best way to create global list variable/symbol

2016-12-18 Thread dean
Joh-Tob >Why not use the idea i presented? It's not that I won'tI'd only just come back to show what I'd found re function arguments when I saw your solutions. Again...thank you very much for them. All code related to what I'm trying to do is extremely helpful given my inexperience with

Re: best way to create global list variable/symbol

2016-12-17 Thread Alexander Burger
On Sat, Dec 17, 2016 at 11:51:04PM +0100, Joh-Tob Schäg wrote: > There is no (efficient) way to find the symbol (1 2 3) is bound to. So > would you have to know the symbol all the time. > > (de add-to-global-list (Sym Value) >(setq Sym (cons Value Sym))) > (de delete-from-global-list (Sym) >

Re: best way to create global list variable/symbol

2016-12-17 Thread Joh-Tob Schäg
Why not use the idea i presented? The one using fill? Do you understand it? 2016-12-18 0:25 GMT+01:00 dean : > Thank you Joh-Tob...I'll have a good look at that because ultimately I do > want to use picolisp objects. > I just came back to say that changing the argument

Re: best way to create global list variable/symbol

2016-12-17 Thread dean
Thank you Joh-Tob...I'll have a good look at that because ultimately I do want to use picolisp objects. I just came back to say that changing the argument name from *L (also the global symbol) to Larg seemed to crack this. It's as if...given a conflict between a global symbol and a local argument

Re: best way to create global list variable/symbol

2016-12-17 Thread Joh-Tob Schäg
For the case: (setq A ( 1 2 3 )) There is no (efficient) way to find the symbol (1 2 3) is bound to. So would you have to know the symbol all the time. (de add-to-global-list (Sym Value) (setq Sym (cons Value Sym))) (de delete-from-global-list (Sym) (setq Sym (cdr Sym))) But i guess you do

Re: best way to create global list variable/symbol

2016-12-17 Thread Alexander Burger
Hi Dean, On Sat, Dec 17, 2016 at 06:02:29PM +, dean wrote: > #{Is it possible to change a list AND keep it's name the same at different > program levels}# > (setq L '(a)) > (de doit_temp (L) (prog (setq L (append L '(b))) (prinl "inside of fn L is > " L)) ) > (de doit_perm (L) (setq NewL

best way to create global list variable/symbol

2016-12-17 Thread dean
#{Is it possible to change a list AND keep it's name the same at different program levels}# (setq L '(a)) (de doit_temp (L) (prog (setq L (append L '(b))) (prinl "inside of fn L is " L)) ) (de doit_perm (L) (setq NewL (append L '(b (doit_temp L) (prinl "outside of fn L is " L) (doit_perm L)