octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #63935] error during evaluation of conditional


From: A.R. Burgers
Subject: [Octave-bug-tracker] [bug #63935] error during evaluation of conditional in if
Date: Thu, 16 Mar 2023 17:50:12 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?63935>

                 Summary: error during evaluation of conditional in if
                   Group: GNU Octave
               Submitter: arb
               Submitted: Thu 16 Mar 2023 09:50:10 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 16 Mar 2023 09:50:10 PM UTC By: A.R. Burgers <arb>
This bit of code is executed without error on octave-5.2.1 and matlab:


v = cell(4,1);
for i = 1 : 4
  v{i} = rand(10,3);
end
s = [1;3;5;7];
s1 = s <= 1
vc = cellfun('isclass', v, 'char')
vc & s1
if cellfun('isclass', v, 'char') & s <= 1
  disp('if branch true');
else
  disp('if branch false');
end


with this output:


if branch false


On both stable 8.x and dev 9.x execution is halted during evaluation of the if
conditional with this error


error: if: undefined value used in conditional expression









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63935>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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