Documentation: Difference between revisions
Added Arturo implementation
m (→{{header|Phix}}: added syntax colouring, marked p2js compatible) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 42:
end Instrument;</lang>
There is also a tool called [http://sourceforge.net/projects/adadoc/ AdaDoc]. This can be used to generate documentation of an Ada module (or modules?) for a variety of different formats: HTML, LaTeX, plain text and more.
=={{header|Arturo}}==
<lang rebol>f: function [x :integer, y :integer][
;; description: « takes two integers and adds them up
;; options: [
;; double: « also multiply by two
;; ]
;; returns: :integer
result: x+y
if not? null? attr 'double -> result: result * 2
return result
]
info'f</lang>
{{out}}
<pre>|--------------------------------------------------------------------------------
| f :function 0x10AAE6600
|--------------------------------------------------------------------------------
| takes two integers and adds them up
|--------------------------------------------------------------------------------
| usage f x :integer
| y :integer
|
| options .double -> also multiply by two
|
| returns :integer
|--------------------------------------------------------------------------------</pre>
=={{header|AutoHotkey}}==
|