Re: LET* where to put end ) and way



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
.