[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59950] exist function
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #59950] exist function |
Date: |
Sat, 30 Jan 2021 12:10:05 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #7, bug #59950 (project octave):
Interesting. Here are two more to try:
exist (table({'foo','bar'}),'')
exist (table({'foo','bar'}),[])
exist (table({'foo','bar'}),table())
If those all return 0 and no error, then I guess the checks are done something
like this:
if (nargin == 1)
if (isempty (first_arg))
return false;
else
second_arg = ""; ## means search for anything
endif
elseif (nargin == 2
&& (isempty (first_arg) || isempty (second_arg)))
return false;
end
## Check argument types and do the real exist checks ...
If one or more of those fail, then maybe someone else can figure out an order
for the argument checks that is both simple and produces the same results as
Matlab.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59950>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59950] exist function, Arnaud Delorme, 2021/01/26
- [Octave-bug-tracker] [bug #59950] exist function, John W. Eaton, 2021/01/29
- [Octave-bug-tracker] [bug #59950] exist function, John W. Eaton, 2021/01/29
- [Octave-bug-tracker] [bug #59950] exist function, Arnaud Delorme, 2021/01/29
- [Octave-bug-tracker] [bug #59950] exist function, Philip Nienhuis, 2021/01/30
- [Octave-bug-tracker] [bug #59950] exist function, John W. Eaton, 2021/01/30
- [Octave-bug-tracker] [bug #59950] exist function, John W. Eaton, 2021/01/30
- [Octave-bug-tracker] [bug #59950] exist function, Philip Nienhuis, 2021/01/30
- [Octave-bug-tracker] [bug #59950] exist function,
John W. Eaton <=