Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
36
Task/Documentation/REXX/documentation-1.rexx
Normal file
36
Task/Documentation/REXX/documentation-1.rexx
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*REXX program to show how to display embedded documention in REXX code.*/
|
||||
parse arg doc
|
||||
doc=space(doc)
|
||||
if doc=='?' then call help /*show doc if arg is a single ? */
|
||||
/*════════════════════════regular═══════════════════════════════════════*/
|
||||
/*════════════════════════════════mainline══════════════════════════════*/
|
||||
/*═════════════════════════════════════════code═════════════════════════*/
|
||||
/*══════════════════════════════════════════════here.═══════════════════*/
|
||||
exit
|
||||
|
||||
/*──────────────────────────────────HELP subroutine─────────────────────*/
|
||||
help: help=0; do j=1 for sourceline()
|
||||
_=sourceline(j)
|
||||
if _=='<help>' then do; help=1; iterate; end
|
||||
if _=='</help>' then exit
|
||||
if help then say _
|
||||
end /*j*/
|
||||
exit /*stick a fork in it, we're done.*/
|
||||
|
||||
/*──────────────────────────────────start of the in─line documentation.
|
||||
<help>
|
||||
To use the YYYY program, enter:
|
||||
|
||||
|
||||
YYYY numberOfItems
|
||||
YYYY (with no args for the default)
|
||||
YYYY ? (to see this documentation)
|
||||
|
||||
|
||||
─── where:
|
||||
|
||||
numberOfItems is the number of items to be processed.
|
||||
|
||||
If no "numberOfItems" are entered, the default of 100 is used.
|
||||
</help>
|
||||
────────────────────────────────────end of the in─line documentation. */
|
||||
19
Task/Documentation/REXX/documentation-2.rexx
Normal file
19
Task/Documentation/REXX/documentation-2.rexx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue