What is the API provided to programmatically access the
documentation for a given function?
Whatever the API is, may I suggest that this function also
accepts any defined function? The text returned should of
course be the content of the comment header (i.e. the comments
at the beginning of the function prefixed with two ⍝ symbols.
The first line is the summary, while the rest is the long
description.
For the benefit of others on the list that doesn't know how
that works, here's an example from the SQL library:
∇Z←statement SQL∆Select[db] args
⍝⍝ Execute a select statement and return the result
table.
⍝⍝
⍝⍝ The axis parameter indicates the database handle.
⍝⍝
⍝⍝ L is a select statement to be executed. Positional
parameters can
⍝⍝ be supplied by specifying a question mark "?" in the
statemement.
⍝⍝
⍝⍝ R is an array containing the values for the positional
parameters.
⍝⍝ If the array is of rank 2, the statement will be
executed multiple
⍝⍝ times with each row being the values for each call.
⍝⍝
⍝⍝ The return value is a rank-2 array representing the
result of the
⍝⍝ select statement. Null values are returned as ⍬ and
empty strings
⍝⍝ are returned as ''.
Z←statement ⎕SQL[3,db] args
∇