Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Documentation utility

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Documentation utility
#7678
Posted by: PeterJ 2005-12-14 21:47:03
One of my biggest problems is to remember all my own homegrown functions, their parameters etc.

I decided to write a utility that will go through one of my REXX scripts, and create some documentation file for that script. To do this, the utility requires that I preface my functions with a specially formatted REXX comment. The utility will extract information from this comment, and write it out to a HTML documentation file. Here's an example of the specially formatted comment:


/* ----------------------------------------------------------------------
 *H Adds Table control
 * ----------------------------------------------------------------------
 */
new:
...
RETURN
/* ----------------------------------------------------------------------
 *H Add new label to Table
 *L  rc = object~AddTable<blue>(label)
 *L  label  = label name to be added to Tab control 
 *L  returns : 0  label has been added
 *L          > 0  label not added  
 * ----------------------------------------------------------------------
 */
addtable:
... 
RETURN 0
/* ----------------------------------------------------------------------
 *H Removes label from Table
 *L  rc = object~RemoveTable<blue>(label)
 *L  label  = label name to be removed (defaults to current active label
 *L  returns : 0  label has been added
 *L          > 0  label not added  
 * ----------------------------------------------------------------------
 */
removetable:      
...

*H  for example creates a heading in the html file
*!  normal text
*L  normal text in separate line
etc.

I uploaded the utility (and 2 example test scripts) here:

Document.zip g.yi.org/?f=20486

unpack it and run DOCUMENT.REX. Select the other 2 test files: DUMMY.REX, NOUSE.REX as source files and let it generate.

After running DOCUMENT.REX, you'll find in your directory a MyPROCS.HTM (and dummy.htm, nouse.htm). Open MyProcs.HTM, then you can go to the subsequent documents for dummy and nouse. These are the documents which were generated!
Check the comments (represents the documentation) in  DUMMY.REX, NOUSE.REX.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-4-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0