octave-maintainers
[Top][All Lists]
Advanced

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

Re: deftypefn or defun (deffn)


From: John W. Eaton
Subject: Re: deftypefn or defun (deffn)
Date: Thu, 21 Apr 2016 10:35:09 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 04/21/2016 10:25 AM, JuanPi wrote:
Hi all,

Working with a documentation for  anew package I found that we use
deftypefn for m-files although functions in Octave are not typed
functions. Shouldn't we use defun (a.k.a. deffn) instead? That seem to
be the case for the Interval package, but maybe there is a reason tu
use the typed function command instead.

We use deftypefn so that we can show the name of the returned value(s). In places where that is not needed, I suppose we could use deffn. But it seems simpler to me to always use the same form.

jwe




reply via email to

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