[Top][All Lists]

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

[Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-li

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-like numeric inputs such as Inf, NaN, i
Date: Tue, 15 Sep 2020 21:43:17 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #4, bug #59103 (project octave):

I also spent some time trying to figure out how to get compatibility.  My
latest attempt is attached.  I don't think it is correct, as it fails for the
arrayfun example in the Matlab docs for inputname.

I would still be interested to know what happens for the following in Matlab:

What does

inputname (1)

say at the top-level command prompt?

If the following commands are placed in a script, what happens when you
execute it?

abcdefg = 1
fh_n = @(n, x) inputname (n)
fh_n (2, abcdefg)

What about this script?

abcdefg = 1;
fh_1 = @(x) inputname (1)
fh_1 (abcdefg)

What happens if you define and execute the following function?

function foofun_n ()
  abcdefg = 1;
  fh_n = @(n, x) inputname (n)
  fh_n (2, abcdefg)

And this one?

function foofun_1 ()
  abcdefg = 1;
  fh_1 = @(x) inputname (1)
  fh_1 (abcdefg)

I could be surprised, but my guess is I'll be even more convinced that the
inputname function belongs in the "WTF, Matlab?!?" category.


Reply to this item at:


  Message sent via Savannah

reply via email to

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