Lecture overview -- Keyboard shortcut: 'u'  Previous page: SchemeDoc -- Keyboard shortcut: 'p'  Next page: SchemeDoc details -- Keyboard shortcut: 'n'  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Page 6 : 8
Scheme Program Documentation Tools
Multi-semicolon style

Abstract, section, and definition comments

Internal structure of definition comments

Click to resulting web page

 

;;;; .title SchemeDoc Demo
;;;; .author Kurt Normark
;;;; .affiliation Aalborg University, Denmark
;;;; This is a brief example of a Scheme 
;;;; program with multi-semicolon SchemeDoc comments.

; This comment is not extracted.

;;; Factorials. 
;;; .section-id fac-stuff
;;; This section demonstrates a plain function.

;; The factorial function. Also known as n!
;; .parameter n An integer
;; .pre-condition n >= 0
;; .returns n * (n-1) * ... * 1
(define (fac n)
 (if (= n 0) 1 (* n (fac (- n 1)))))

;;; List selection functions.
;;; .section-id list-stuff
;;; This section demonstrates two aliased functions.

;; An alias of car. 
;; .returns The first component of a cons cell
;; .form (head pair)
;; .parameter pair A cons cell
(define head car)

;; An alias of cdr.
;; .returns The second component of a cons cell
;; .form (tail pair)
;; .parameter pair A cons cell
(define tail cdr)

A Scheme program with documentation comments - multi-semicolon.

/user/normark/scheme/examples/manual-xml-in-laml/scheme-documentation-tools/prog1a.scmA Scheme program with documentation comments - documentation-mark.

A Scheme program with documentation comments - documentation-mark.