Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dumb newbie question

4 views
Skip to first unread message

Mari

unread,
Jan 11, 1998, 3:00:00 AM1/11/98
to

Is there a way to do multiline comments in Common LISP/MCL?

/*
For example, these two sentences would be comments if I was programming
in Java. However, I am not using Java because I'm trying to learn LISP
and since I don't know how to do this in LISP I am stuck using a lot of
semicolons for now. :-)
*/

Thanks,
Mari

..................................
Mari Masuda * mbma...@colby.edu
www.colby.edu/personal/mbmasuda/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Barry Margolin

unread,
Jan 12, 1998, 3:00:00 AM1/12/98
to

In article <Pine.hpx.3.96.98011...@host-00.colby.edu>,

Mari <mbma...@colby.edu> wrote:
>Is there a way to do multiline comments in Common LISP/MCL?

#| ...

|#

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.

Frank Chen

unread,
Jan 12, 1998, 3:00:00 AM1/12/98
to

In article <Pine.hpx.3.96.98011...@host-00.colby.edu>,

Mari wrote:
>Is there a way to do multiline comments in Common LISP/MCL?
>/*
> For example, these two sentences would be comments if I was programming
> in Java. However, I am not using Java because I'm trying to learn LISP
> and since I don't know how to do this in LISP I am stuck using a lot of
> semicolons for now. :-)
>*/
>Thanks,
>Mari
>..................................
> Mari Masuda * mbma...@colby.edu
> www.colby.edu/personal/mbmasuda/
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hi Mari,
Everything placed between a #| and |# is ignored.
Two very good introductory texts on Common Lisp that I've used are:
1) "ANSI Common Lisp" by Paul Graham. Prentice-Hall, 1996.
ISBN: 0-13-370875-6
and 2) "Programming in Common Lisp" by Rodney A. Brooks. John Wiley & Sons
1985.
ISBN: 0-471-81888-7

--
+--------------------------------------------------------------------+
| Rui Qi Chen University of Guelph |
| Computing & Information Science Guelph, Ontario |
| Email: rqc...@acm.org N1G 2W1 CANADA |
+--------------------------------------------------------------------+


Erik Naggum

unread,
Jan 12, 1998, 3:00:00 AM1/12/98
to

* Mari Masuda

| Is there a way to do multiline comments in Common LISP/MCL?

* Frank Chen


| Everything placed between a #| and |# is ignored.

this is not so, actually. your statement could easily be construed to
mean that the a #| is terminated by the first following |#, but #| and |#
comments nest. this means that it is quite safe to comment out an
arbitrary amount of code with #| ... |#, quite unlike /* and */ in C,
which are useless if the region you wish to comment out may contain
another comment.

#:Erik, picking another nit for my nit collection, soon go to on world tour
--
The year "98" was new 1900 years ago. | Help fight MULE in GNU Emacs 20!
Be year 2000 compliant, write "1998"! | http://sourcery.naggum.no/emacs/

Kent M Pitman

unread,
Jan 12, 1998, 3:00:00 AM1/12/98
to

Mari <mbma...@colby.edu> writes:

> Is there a way to do multiline comments in Common LISP/MCL?
>

> /*
> For example, these two sentences would be comments if I was programming
> in Java. However, I am not using Java because I'm trying to learn LISP
> and since I don't know how to do this in LISP I am stuck using a lot of
> semicolons for now. :-)
> */
>
> Thanks,
> Mari

#| Yes,
there is.
#| And yes, it nests. |#
|#


--- KMP's Style Recommendation Notes Follow ---

Btw, if you are commenting out code, you are stylistically
advised to use #||....||# since some editors think that |...|
occurs in balanced pairs (like "...") and that parens don't
have to balance between them; using double-||'s won't affect
Lisp at all, but will make some text editors do better paren
balancing. When in #||...||#, I encourage use of ;'s or
#|...|# for text comments since if the #||...||# is removed,
you should have parseable-code left.

#|| ;The entire rest of this message is useless
;and has been commented out.

#| 1) This is a comment.
2) It's not a comment containing code.
3) Parens needn't balance.
|#

#||
(defun foo (x) ;obsolete, use new BAR
x)
||#

(defun bar (y) y) ;cool new name

||#

Erik Naggum

unread,
Jan 13, 1998, 3:00:00 AM1/13/98
to

* Mari Masuda

| Is there a way to do multiline comments in Common LISP/MCL?

* Frank Chen


| Everything placed between a #| and |# is ignored.

this is not so, actually. your statement could easily be construed to
mean that the a #| is terminated by the first following |#, but #| and |#
comments nest. this means that it is quite safe to comment out an
arbitrary amount of code with #| ... |#, quite unlike /* and */ in C,
which are useless if the region you wish to comment out may contain
another comment.

#:Erik, picking another nit for my nit collection, soon to go on world tour

김영문

unread,
Jan 20, 1998, 3:00:00 AM1/20/98
to

연습입니다.....sorry.......very....much

ank Chen 이(가) 메시지에서 작성하였습니다...


>In article <Pine.hpx.3.96.98011...@host-00.colby.edu>,
>Mari wrote:

>>Is there a way to do multiline comments in Common LISP/MCL?

>>/*
>> For example, these two sentences would be comments if I was programming
>> in Java. However, I am not using Java because I'm trying to learn LISP
>> and since I don't know how to do this in LISP I am stuck using a lot of
>> semicolons for now. :-)
>>*/
>>Thanks,
>>Mari

>>..................................
>> Mari Masuda * mbma...@colby.edu
>> www.colby.edu/personal/mbmasuda/
>>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Hi Mari,

> Everything placed between a #| and |# is ignored.

0 new messages