Documentation: Difference between revisions
→{{header|REXX}}: REXX: version 2
(Added Logtalk example.) |
Walterpachl (talk | contribs) (→{{header|REXX}}: REXX: version 2) |
||
Line 972:
=={{header|REXX}}==
===version 1===
One technique with REXX is to use in-line documentation as REXX supports the accessing of
<br>the REXX program's source, which can include documentation if properly ''fenced''.
Line 1,015 ⟶ 1,016:
</help>
────────────────────────────────────end of the in─line documentation. */</lang>
===version 2===
<lang rexx>/* REXX ***************************************************************
* 13.10.2013 Walter Pachl another way to show documentation
* no tags and good enough if only one documentation block
**********************************************************************/
beghelp=here()+1 /* line where the docmentation begins
Documentation
any test explaining the program's invocaion and workings
---
and where it ends */
endhelp=here()-2
If arg(1)='?' Then Do
Do i=beghelp To endhelp
Say sourceline(i)
End
Exit
End
say 'the program would be here!'
Exit
here: return sigl /* returns the invocation's line number */</lang>
=={{header|Ruby}}==
|