; comment

syntaxsince v0.0-1853 in clojure in ednEdit

A single line comment.

  • ; this is a comment
  • ;; two semicolons is also common

Details:

"Comments out" everything after ; on the current line.


Examples:

Add comments to code:

(def a 1) ; this is a comment

It is common to use ;; for comments that have their own line:

;; this comment is on its own line

See Also:


Reader code @ tools.reader:src/main/clojure/clojure/tools/reader/impl/commons.clj
(defn read-comment
  [rdr & _]
  (skip-line rdr))

Reader table @ tools.reader:src/main/clojure/clojure/tools/reader.clj
(defn- macros [ch]
  (case ch
    \" read-string*
    \: read-keyword
    \; read-comment
    \' (wrapping-reader 'quote)
    \@ (wrapping-reader 'clojure.core/deref)
    \^ read-meta
    \` read-syntax-quote ;;(wrapping-reader 'syntax-quote)
    \~ read-unquote
    \( read-list
    \) read-unmatched-delimiter
    \[ read-vector
    \] read-unmatched-delimiter
    \{ read-map
    \} read-unmatched-delimiter
    \\ read-char*
    \% read-arg
    \# read-dispatch
    nil))