Q&A's, tips, howto's
hartrock
Posts: 136 Joined: Wed Aug 07, 2013 9:37 pm
Post
by hartrock » Thu Aug 13, 2015 1:47 am
Tried after User Manual and Reference v.10.6.4:
Code: Select all
sr@free:~/newLISP$ newlisp
newLISP v.10.6.4 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (macro (double X) (+ X X))
(lambda-macro (X) (expand '(+ X X)))
> (define double (lambda-macro (X) (expand '(add X X))))
ERR: symbol is protected in function define : double
>
Last edited by
hartrock on Thu Aug 13, 2015 9:50 am, edited 1 time in total.
ralph.ronnquist
Posts: 228 Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia
Post
by ralph.ronnquist » Thu Aug 13, 2015 2:57 am
Good catch. And it happens on 10.6.[23] as well.
hartrock
Posts: 136 Joined: Wed Aug 07, 2013 9:37 pm
Post
by hartrock » Thu Aug 13, 2015 9:32 am
But it works with:
Code: Select all
sr@free:~/newLISP$ newlisp
newLISP v.10.6.4 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (macro (double X) (+ X X))
(lambda-macro (X) (expand '(+ X X)))
> (constant 'double (lambda-macro (X) (expand '(add X X))))
(lambda-macro (X) (expand '(add X X)))
> double
(lambda-macro (X) (expand '(add X X)))
>
So this seems to be a minor issue.
PS: Is this the best place for such reports? Is it OK, to delete this post after a fix?
Lutz
Posts: 5289 Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:
Post
by Lutz » Thu Aug 13, 2015 1:31 pm
In v10.6.4 the manual entry has been changed to constant .
Note, that changes to an expansion macro definition only affect future loaded code, not already read and expanded code.
Ps: don't delete bug posts.