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. :-) */
In article <Pine.hpx.3.96.980111165556.5178A-100...@host-00.colby.edu>,
Mari <mbmas...@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.
In article <Pine.hpx.3.96.980111165556.5178A-100...@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 * mbmas...@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 | +--------------------------------------------------------------------+
* 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/
Mari <mbmas...@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. |#
* 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 -- 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/
>In article <Pine.hpx.3.96.980111165556.5178A-100...@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 * mbmas...@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 | >+--------------------------------------------------------------------+