Re: LET* where to put end ) and way
- From: Rainer Joswig <joswig@xxxxxxx>
- Date: Wed, 25 Jul 2007 23:32:04 +0200
In article <1185397349.820629.37470@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
anders <anders.u.persson@xxxxxxxxx> wrote:
I started to look att www.franz.com video introduktion for LISP and
have a seen test program for let*
(let* (( x 0)
(y ( * 2 3))
z )
(print z)
(format t "~% (~a,~a)" x y )))
There is one parenthesis at the end you might want to delete.
Properly formatted it looks like this:
(let* (( x 0)
(y ( * 2 3))
z)
(print z)
(format t "~% (~a,~a)" x y))
and i was trying to write a version of hello world using let*
like this
(defun hello ()
(let* (
(USER "Anders")
(MESSAGE "Best regards"))
(format t "~% ~a ~a " MESSAGE USER)))
You should use the Lisp indenting feature of your
favorite editor.
(defun hello ()
(let* ((USER "Anders")
(MESSAGE "Best regards"))
(format t "~% ~a ~a " MESSAGE USER)))
Both works but in exampel 1 the let* last ) is after z...
But to make exampel 2 work i have to set last ) for let* after format
LET* encloses the whole form.
If not format say USER and MESSAGE is not define.
I can't understand de diffrent, can some one tell me if i make my
samting wrong
or is i a good reason for de diffrens..
// Anders
Check out the syntax for LET* here:
http://www.lispworks.com/documentation/HyperSpec/Body/s_let_l.htm#letST
--
http://lispm.dyndns.org
.
- Follow-Ups:
- Re: LET* where to put end ) and way
- From: anders
- Re: LET* where to put end ) and way
- References:
- LET* where to put end ) and way
- From: anders
- LET* where to put end ) and way
- Prev by Date: Re: Is Lisp a Blub?
- Next by Date: Re: WXCL on Linux - anybody got it working?
- Previous by thread: LET* where to put end ) and way
- Next by thread: Re: LET* where to put end ) and way
- Index(es):
Relevant Pages
|