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: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #63935] error during evaluation of conditional in if
Date: Fri, 17 Mar 2023 13:52:02 -0400 (EDT)

Follow-up Comment #5, bug #63935 (project octave):

The code in pt-eval.cc: 

bool
tree_evaluator::is_logically_true (tree_expression *expr,
                                   const char *warn_for)
{
  bool expr_value = false;

  m_call_stack.set_location (expr->line (), expr->column ());

  octave_value t1 = expr->evaluate (*this);

  if (t1.is_defined ())
    return t1.is_true ();
  else
    error ("%s: undefined value used in conditional expression", warn_for);

  return expr_value;
}




    _______________________________________________________

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]