Documentation: Difference between revisions

added Ol
(→‎{{header|D}}: add crystal's docs tool as a solution)
(added Ol)
Line 1,071:
=={{header|OCaml}}==
[http://caml.inria.fr/pub/docs/manual-ocaml/manual029.html OCamldoc] is a documentation generator that is included with OCaml. Documentation comments all start with <code>(**</code> (but no more than two asterisks) and end with <code>*)</code>. Like Javadoc, "tags" can be embedded starting with <code>@</code>.
 
=={{header|Ol}}==
No builtin documentation is provided in Ol. Use comments in source code and any resonable external tool, for example handmade scripts.
 
i.e.
<lang scheme>
; note: use this script to generate a markdown file
; sed -n 's/\s*;!\s*//gp'
 
(import (owl parse))
 
;! # Documentation
 
;! ## Functions
 
;! ### whitespace
;! Returns a #true if argument is a space, newline, return or tab character.
(define whitespace (byte-if (lambda (x) (has? '(#\tab #\newline #\space #\return) x))))
 
;! ### maybe-whitespaces
;! Returns any amount (including 0) of whitespaces. Used as whitespace characters skipper in parses.
(define maybe-whitespaces (greedy* whitespace))
</lang>
 
Sed script:
<pre>sed -n 's/\s*;!\s*//gp'
</pre>
 
{{Out}}
<pre>
# Documentation
## Functions
### whitespace
Returns a #true if argument is a space, newline, return or tab character.
### maybe-whitespaces
Returns any amount (including 0) of whitespaces. Used as whitespace characters skipper in parses.
</pre>
 
=={{header|PARI/GP}}==