octave-maintainers
[Top][All Lists]
Advanced

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

Re: Matlab-style empty output/input arguments support


From: Judd Storrs
Subject: Re: Matlab-style empty output/input arguments support
Date: Fri, 29 Jan 2010 12:16:43 -0500

On Fri, Jan 29, 2010 at 3:59 AM, Jaroslav Hajek <address@hidden> wrote:
>
> The problem with option 1 (shrinking the list) is that you wouldn't be
> able to do things like
> [d, ~, f] = [a, ~, c] = myfun (...)
> with the obvious meaning (f would be undefined here).

Under option 1, you would get the same effect by omitting the ~ on the
last assignment. i.e. by doing this instead:

[d, f] = [a, ~, c] = myfun ( ... )

I'm fine with option 2, though. Treating ~ like [] seems somewhat
symmetric with empty positional arguments.

min(a,[],2)
min(a,~,2)


--judd


reply via email to

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