[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Re: learning Lisp
From: |
Bill Page |
Subject: |
RE: [Axiom-developer] Re: learning Lisp |
Date: |
Tue, 6 Dec 2005 08:23:21 -0500 |
On December 6, 2005 1:11 AM William Sit wrote:
>
> Bill Page wrote:
> > In order to illustrate "live" use of lisp on MathAction I think
> > I need to invent a new enviroment like this:
> >
> > \begin{lisp}
> > (defun foo (x y)
> > (+ x y))
> > (foo 2 3)
> > \end{lisp}
> >
> > The text between \begin{lisp} and \end{lisp} would be saved to
> > a file called, e.g. 'section_n.lisp' and then executed with the
> > command ')lisp (load section_n.lisp)'. This would allow Axiom
> > interpreter commands, spad/aldor compiles and full multi-line
> > lisp expressions to appear on the same web page.
> >
> > Comments?
>
> I tried:
>
> file test2.lisp now containing some lisp commands
>
> (1)->)lisp (load "test2.lisp")
> (1)->
> Value = T
> (1)->
>
> and this is independent of what is in the file! None of the
> functions defined in the file is defined afterwards.
Are you sure? This works for me:
File: hello.lisp:
(defun hello-world ()
(format t "hello, world"))
(hello-world)
------------
File: hello.input:
)lisp (load "hello.lisp")
)lisp (hello-world)
---------
(1) -> )read hello.input
)lisp (load "hello.lisp")
hello, world
Value = T
)lisp (hello-world)
hello, world
Value = NIL
(1) ->
----------
Regards,
Bill Page.
- RE: [Axiom-developer] Re: learning Lisp,
Bill Page <=
- RE: [Axiom-developer] Re: learning Lisp, Page, Bill, 2005/12/06
- Re: [Axiom-developer] Re: learning Lisp, root, 2005/12/06
- RE: [Axiom-developer] Re: learning Lisp, C Y, 2005/12/06
- Re: [Axiom-developer] Re: learning Lisp, root, 2005/12/06
- Re: [Axiom-developer] Re: learning Lisp, root, 2005/12/06
- [Axiom-developer] Lisp Packages and Axiom, C Y, 2005/12/07
- [Axiom-developer] Re: Lisp Packages and Axiom, root, 2005/12/07
- [Axiom-developer] Re: Lisp Packages and Axiom, C Y, 2005/12/07
- [Axiom-developer] Re: Lisp Packages and Axiom, root, 2005/12/07
- Re: [Axiom-developer] Lisp Packages and Axiom, Martin Rubey, 2005/12/07