octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing 'help' functions as m-files


From: Søren Hauberg
Subject: Re: Writing 'help' functions as m-files
Date: Wed, 11 Feb 2009 07:26:46 +0100

tir, 10 02 2009 kl. 22:04 -0500, skrev John W. Eaton:
> I parsed the output by noting that each formatted docstring should
> begin with
> 
>  " -- Function File: ..."
> 
> or similar. The key is that the " -- " at the beginning of a line
> should only appear as the tag of a header like this, so I just look
> for the end of the last line containing one of those, and assume the
> first sentence begins just after that.

Does that work when the header span several lines? Typing 'help
makeinfo'  (as an example) gives me

 -- Function File: [RETVAL, STATUS] = makeinfo (TEXT, OUTPUT_TYPE)
 -- Function File: [RETVAL, STATUS] = makeinfo (TEXT, OUTPUT_TYPE,
          SEE_ALSO)
     Run `makeinfo' on a given text.

plus some more. From what you described I would assume that the first
help sentence would be

          SEE_ALSO)
     Run `makeinfo' on a given text.

Which isn't really what we want.

> | Well, it does run the makeinfo program... But you're right that it does
> | more than this. I don't mind renaming it, but I don't think it should be
> | a "hidden" function (or whatever we call functions that begin with
> | "__"). I use the function quite a bit for generating web pages for
> | Octave-Forge, so I'd at least appreciate if its API was fairly stable. 
> 
> I don't think the API would change much. It's just that it seems to me
> that it is the wrong name for such a specialized function, and I don't
> think very many users will need it.

OK. I guess you're right. Let's just call it __makeinfo__

Soren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]