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
.



Relevant Pages

  • LET* where to put end ) and way
    ... have a seen test program for let* ... Both works but in exampel 1 the let* last) is after z... ... 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 ...
    (comp.lang.lisp)
  • Re: LET* where to put end ) and way
    ... have a seen test program for let* ... 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 ... being succinct with specifying nil? ...
    (comp.lang.lisp)
  • Re: Benchmarking differerent Common LISP implememtations with very simple ad hoc tests
    ... The function (common-lisp-test) ... statistics based discussion of the timing results. ... (defun values-of-pi () ... (format t "The values of PI:") ...
    (comp.lang.lisp)
  • CLOS / MOP discussion archives for Thunderbird
    ... what seems to be the original mailing list for the designers of CLOS and ... convert the format of that archive to one that is accepted by ... The conversion is not perfect, ... (defun copy-header (input output) ...
    (comp.lang.lisp)
  • Re: massive data analysis with lisp
    ... (defclass movie () ... (defun open-db (db-path) ... (format t "Opening Allegrocache DB...~%") ... I tried Franz and Allegrocache -- and it failed with GC ...
    (comp.lang.lisp)