Tuesday, July 12, 2005, 11:20:13 PM, Bernie wrote:

> Perhaps Rebol needs it's own built-in documentation standard.
> MakeDoc is a very good tool for that purpose, but I don't see it
> being used very much. An embedded documentation feature, a bit like
> Perl's POD (Plain Old Documentation) or Java's JavaDoc, both of
> which are embedded within a source program's comments, might be a
> nice thing to add to Rebol.

REBOL has a built-in documentation facility - I'll leave it up to you
to decide upon it's comparability to JavaDoc or POD (IMHO REBOL's
'help and 'source as well as the philosophy behind them are extremely
nice).

If we have a look at the function 'forskip, we see documentation
strings everywhere:

>> source forskip
forskip: func [
    "Evaluates a block for periodic values in a series."
    [throw]
    'word [word!] {Word set to each position in series and changed as a result}
    skip-num [integer!] "Number of values to skip each time"
    body [block!] "Block to evaluate each time"
][
    while [not tail? get word] [
        do body
        set word skip get word skip-num
    ]
]

this is used by REBOL's 'help function do output nice usage
descriptions:

>> help forskip
USAGE:
    FORSKIP 'word skip-num body

DESCRIPTION:
     Evaluates a block for periodic values in a series.
     FORSKIP is a function value.

ARGUMENTS:
     word -- Word set to each position in series and changed as a result (Type: 
word)
     skip-num -- Number of values to skip each time (Type: integer)
     body -- Block to evaluate each time (Type: block)


the details of this builtin documentation facility are explained in
the REBOL/Core manual.

-- 
Best regards,
 Andreas


-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to