help-octave
[Top][All Lists]
Advanced

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

Re: M-function signature -- command to show?


From: Jordi Gutiérrez Hermoso
Subject: Re: M-function signature -- command to show?
Date: Fri, 27 Jul 2012 17:24:02 -0400

On 27 July 2012 17:18, fork <address@hidden> wrote:
> Jordi Gutiérrez Hermoso <jordigh <at> octave.org> writes:
>
>>
>> On 27 July 2012 16:08, fork <forkandwait <at> gmail.com> wrote:
>> > Is there a command to show the signature of a function in an m-file?
>>
>> Functions don't have signatures. sin(1,2,3) is a valid function call
>> as far as the interpreter is concerned. It's up to the sin() function
>> to decide if it should throw an error or not for being called with
>> more than one argument.
>>
>> So, no.
>
> Is the text of the function stored somewhere that a function could get it?

No, the interpreter throws that out once it's done parsing the
function, but read help.m for one thing you could is store this
"signature" in the help text. Look at the source for help.m to give
you some ideas.

- Jordi G. H.


reply via email to

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