[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing 'help' functions as m-files
From: |
John W. Eaton |
Subject: |
Re: Writing 'help' functions as m-files |
Date: |
Thu, 27 Mar 2008 12:06:15 -0400 |
On 27-Mar-2008, David Bateman wrote:
| This imposes a lot of work adapting the existing code and might make
| oct-files that aren't part of Octave incompatible, so even if this
| change is made we should support the old way of doing it as well.
Yes, we would still handle doc strings defined as they are now. But
allowing them to be written as comments would be nice. For doc
strings defined this way in .oct files we would need a way to generate files
files, we would need a way to gene
| Therefore I rather think this is not really the way to go.. Help from an
| m-file if the help string in the oct-file is empty makes sense though
| (does this work already?)
Yes. If the doc string for a .oct file is empty, Octave will look for
a .m file of the same name. The way it works now is possibly
confusing (but apparently it is compatible behavior). If foo.oct with
no doc string appears somewhere in the path before foo.m with a doc
string, Octave will display the documentation from the .m file even
though it will find and execute foo.oct. It might be better for it to
simply find the function it would execute, then if no doc string is
defined for it, only look for the corresponding .m file rather than
searching the path again. It's hard to imagine that being
incompatible in this way would be a bad thing...
jwe