recent changes to help functions

Ben Abbott bpabbott at mac.com
Sun Jan 25 14:43:49 CST 2009


On Jan 25, 2009, at 2:00 PM, Søren Hauberg wrote:

> søn, 25 01 2009 kl. 19:18 +0100, skrev Søren Hauberg:
>> søn, 25 01 2009 kl. 19:01 +0100, skrev David Bateman:
>>> Again this worked in October when I was working on the OOP stuff.  
>>> Can't
>>> say if it worked recently..
>>
>> Okay, so I got tricked by the simple fact that the only function that
>> actually has any documentation in the 'examples/@polynomial'  
>> directory
>> is indeed the 'polynomial' function. So, this did indeed work before.
>> But it also seems to work with the m-file implementation. The only
>> problem being that the error message is bad. That is, if I type
>>
>>  help @polynomial/polyval
>>
>> and this function doesn't have any documentation, then I get an error
>> message saying
>>
>>  error: help: `@polynomial/polyval' not found
>>
>> which is very misleading (it should just say that the function is not
>> documented).
>
> Okay, the attached changeset changes the error message into saying  
> that
> the function is not documented. Now this stuff seems to work just fine
> for me.
>
> I do, however, still see one regression: I cannot do
>
>  type @polynomial/set
>
> which used to be possible. The problem is that
>
>  exist ("@polynomial/set")
>
> returns 0 which the new implementation of 'type' cannot handle. So, my
> question is: should the above call to 'exist' return something else,  
> or
> should the 'type' implementation be changed such that it doesn't  
> depend
> on 'exist'?
>
> Søren

Regarding exist ("@polynomial/set"), the commercial implementation  
gives me the result below

 >> mkdir @polynomial
 >> cd @polynomial/
 >> !echo '% empty help string' > set.m
 >> cd ..
 >> exist('@polynomial/set')
ans = 2

Ben






More information about the Octave-maintainers mailing list