gold0

pgmcomment

Mar 8th, 2020
1,554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.10 KB | None | 0 0
  1. https://en.wikipedia.org/wiki/Comment_(computer_programming)  
  2. https://en.wikipedia.org/wiki/Lisp_(programming_language)  
  3. https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html
  4. https://stackoverflow.com/questions/6365334/lisp-commenting-convention
  5.  
  6.  
  7. Haskell : Line comments   start with '--' (two hyphens) until the end of line,
  8. and multiple line comments start with '{-' and end with '-}'.
  9.  
  10. BF : [-][*]
  11.  
  12. In Common Lisp:
  13. ;;;; At the top of source files
  14. ;;; Comments at the beginning of the line
  15. (defun test (a &optional b)
  16.   ;; Commends indented along with code
  17.   (do-something a)                      ; Comments indented at column 40, or the last
  18.   (do-something-else b))                ; column + 1 space if line exceeds 38 columns
  19. Note: Emacs doesn't fontify #| |# very well, but as Rainer suggests in the comments, try using #|| ||# instead.
  20. I'd say there are no rules to use this one, but I reckon it's faster for commenting huge amounts of code, or to insert some long description where the semicolons just get in the way of editing, like huge BNF listings or the like.
  21.  
  22. --
Advertisement