[parenscript-devel] Problems with "new"
![](https://secure.gravatar.com/avatar/efdd04188fadf3ce843997964ae1e00d.jpg?s=120&d=mm&r=g)
Hello i am new to parenscript. i am stuck with my attempt to create an instance of a new object. Why does: (parenscript:ps (new (*date))) translates to: "new(Date());" instead of: "new Date();" i tried various possiblities but simply could not get it. How does on do it properly? Thanks for help Matus
![](https://secure.gravatar.com/avatar/6ceed633057ef2a85c19d4e5003d8f0c.jpg?s=120&d=mm&r=g)
Hi, I'm new to parenscript but maybe I can answer this one. I believe the problem you are having is package related. 'new' is a macro in the parenscript package, so you need to call it like this: (parenscript:ps (parenscript:new (date))) I recommend you use-package parenscript and you wouldn't have this problem: CL-USER> (use-package :parenscript) T CL-USER> (ps (new (date))) "new date();" Hope this helps, Anthony On Sat, Aug 6, 2011 at 3:23 PM, Mentus Sarovar <mentusss@gmail.com> wrote:
Hello
i am new to parenscript. i am stuck with my attempt to create an instance of a new object.
Why does:
(parenscript:ps (new (*date)))
translates to:
"new(Date());"
instead of:
"new Date();"
i tried various possiblities but simply could not get it. How does on do it properly?
Thanks for help Matus
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
![](https://secure.gravatar.com/avatar/efdd04188fadf3ce843997964ae1e00d.jpg?s=120&d=mm&r=g)
Oh s..., of course! Going better to sleep now :-) Thanks. Matus On Sun, Aug 7, 2011 at 12:34 AM, Anthony Fairchild <fairchild.anthony@gmail.com> wrote:
Hi, I'm new to parenscript but maybe I can answer this one. I believe the problem you are having is package related. 'new' is a macro in the parenscript package, so you need to call it like this: (parenscript:ps (parenscript:new (date))) I recommend you use-package parenscript and you wouldn't have this problem:
CL-USER> (use-package :parenscript) T CL-USER> (ps (new (date))) "new date();" Hope this helps, Anthony On Sat, Aug 6, 2011 at 3:23 PM, Mentus Sarovar <mentusss@gmail.com> wrote:
Hello
i am new to parenscript. i am stuck with my attempt to create an instance of a new object.
Why does:
(parenscript:ps (new (*date)))
translates to:
"new(Date());"
instead of:
"new Date();"
i tried various possiblities but simply could not get it. How does on do it properly?
Thanks for help Matus
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
participants (2)
-
Anthony Fairchild
-
Mentus Sarovar