comparison libinterp/corefcn/variables.cc @ 30337:eff73c13fcf3

remove functions deprecated in version 6 * runtests.m: Delete. * scripts/deprecated/module.mk: Update. * error.h, error.cc (error_state, reset_error_handler): Delete. * errwarn.h (warn_divide_by_zero): Delete. * file-io.cc (mark_for_deletion, cleanup_tmp_files): Delete from global namespace. * interpreter.cc, toplev.cc: Don't include file-io.h. * graphics-toolkit.h (graphics_toolkit, base_graphics_toolkit): Delete from global namespace. * input.h, input.cc (Vtrack_line_num): Delete. * interpreter.h, interpreter.cc (interpreter::add_atexit_function, interpreter::remove_atexit_function, interpreter::add_atexit_function_deprecated, interpreter::remove_atexit_function_deprecated): Delete. * symtab.h, symtab.cc (symbol_table::at_top_level_deprecated, symbol_table::varval_deprecated, symbol_table::global_varval_deprecated, symbol_table::top_level_varval_deprecated, symbol_table::global_variable_names_deprecated, symbol_table::top_level_variable_names_deprecated, symbol_table::variable_names_deprecated, symbol_table::assign_deprecated, symbol_table::clear_all_deprecated, symbol_table::clear_global_deprecated, symbol_table::clear_global_pattern_deprecated, symbol_table::clear_symbol_deprecated, symbol_table::clear_symbol_pattern_deprecated, symbol_table::global_assign_deprecated, symbol_table::top_level_assign_deprecated, symbol_table::at_top_level, symbol_table::varval, symbol_table::global_varval, symbol_table::top_level_varval, symbol_table::global_variable_names, symbol_table::top_level_variable_names, symbol_table::variable_names, symbol_table::assign, symbol_table::clear_all, symbol_table::clear_global, symbol_table::clear_global_pattern, symbol_table::clear_symbol, symbol_table::clear_symbol_pattern, symbol_table::global_assign, symbol_table::top_level_assign): Delete. * variables.h, variables.cc (extract_function): Delete. * ov-fcn-handle.h, ov-fcn-handle.cc (make_fcn_handle): Delete. * lo-array-errwarn.h, lo-array-errwarn.cc (err_index_out_of_range): Delete. * quit.h, quit.cc (octave_exception_state, internal_exception_state, octave_bad_alloc_hook, enum octave_internal_exception, octave_throw_interrupt_exception, octave_throw_execution_exception, octave_throw_bad_alloc, octave_rethrow_exception): Delete.
author John W. Eaton <jwe@octave.org>
date Wed, 24 Nov 2021 10:26:19 -0500
parents b568c29bb5be
children 841a10208c38
comparison
equal deleted inserted replaced
30336:dc1347cab668 30337:eff73c13fcf3
1523 return set_internal_variable (Vmissing_component_hook, args, nargout, 1523 return set_internal_variable (Vmissing_component_hook, args, nargout,
1524 "missing_component_hook"); 1524 "missing_component_hook");
1525 } 1525 }
1526 1526
1527 OCTAVE_NAMESPACE_END 1527 OCTAVE_NAMESPACE_END
1528
1529 // DEPRECATED in Octave 6
1530
1531 octave_function *
1532 extract_function (const octave_value& arg, const std::string& warn_for,
1533 const std::string& fname, const std::string& header,
1534 const std::string& trailer)
1535 {
1536 octave_function *retval = is_valid_function (arg, warn_for, 0);
1537
1538 if (! retval)
1539 {
1540 std::string s = arg.xstring_value ("%s: argument must be a string",
1541 warn_for.c_str ());
1542
1543 std::string cmd = header;
1544 cmd.append (s);
1545 cmd.append (trailer);
1546
1547 int parse_status;
1548
1549 octave::interpreter& interp
1550 = octave::__get_interpreter__ ("extract_function");
1551
1552 interp.eval_string (cmd, true, parse_status, 0);
1553
1554 if (parse_status != 0)
1555 error ("%s: '%s' is not valid as a function",
1556 warn_for.c_str (), fname.c_str ());
1557
1558 retval = is_valid_function (fname, warn_for, 0);
1559
1560 if (! retval)
1561 error ("%s: '%s' is not valid as a function",
1562 warn_for.c_str (), fname.c_str ());
1563
1564 warning ("%s: passing function body as a string is obsolete; please use anonymous functions",
1565 warn_for.c_str ());
1566 }
1567
1568 return retval;
1569 }