GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cfloat>
#include <limits>
#include <string>
#include "lo-ieee.h"
#include "ov.h"
#include "ov-builtin.h"
#include "symtab.h"
Go to the source code of this file.
Macros | |
#define | SET_INTERNAL_VARIABLE(NM) set_internal_variable (V ## NM, args, nargout, #NM) |
#define | SET_INTERNAL_VARIABLE_CHOICES(NM, CHOICES) set_internal_variable (V ## NM, args, nargout, #NM, CHOICES) |
#define | SET_INTERNAL_VARIABLE_WITH_LIMITS(NM, MINVAL, MAXVAL) set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL) |
#define | SET_NONEMPTY_INTERNAL_STRING_VARIABLE(NM) set_internal_variable (V ## NM, args, nargout, #NM, false) |
#define SET_INTERNAL_VARIABLE | ( | NM | ) | set_internal_variable (V ## NM, args, nargout, #NM) |
Definition at line 120 of file variables.h.
Referenced by DEFUN(), Fbeep_on_error(), Fcompletion_append_char(), Fconfirm_recursive_rmdir(), Fcrash_dumps_octave_core(), Fdebug_jit(), Fdebug_on_error(), Fdebug_on_interrupt(), Fdebug_on_warning(), Fecho_executing_commands(), Ffilemarker(), Ffixed_point_format(), Fhistory_timestamp_format_string(), Fjit_enable(), Fmissing_component_hook(), Fmissing_function_hook(), Foctave_core_file_limit(), Fpage_output_immediately(), Fpage_screen_output(), Fprint_empty_dimensions(), FPS1(), FPS2(), FPS4(), Fsave_header_format_string(), Fsighup_dumps_octave_core(), Fsigterm_dumps_octave_core(), Fsplit_long_rows(), Fsuppress_verbose_help_message(), and Fwhos_line_format().
#define SET_INTERNAL_VARIABLE_CHOICES | ( | NM, | |
CHOICES | |||
) | set_internal_variable (V ## NM, args, nargout, #NM, CHOICES) |
Definition at line 130 of file variables.h.
Referenced by Fsvd_driver().
#define SET_INTERNAL_VARIABLE_WITH_LIMITS | ( | NM, | |
MINVAL, | |||
MAXVAL | |||
) | set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL) |
Definition at line 126 of file variables.h.
Referenced by DEFUN(), DEFUN_DLD(), Fjit_startcnt(), Foutput_max_field_width(), Foutput_precision(), and Fsave_precision().
#define SET_NONEMPTY_INTERNAL_STRING_VARIABLE | ( | NM | ) | set_internal_variable (V ## NM, args, nargout, #NM, false) |
Definition at line 123 of file variables.h.
Referenced by Fbuilt_in_docstrings_file(), Fdoc_cache_file(), FEDITOR(), FEXEC_PATH(), FIMAGE_PATH(), Finfo_file(), Finfo_program(), Fmakeinfo_program(), Foctave_core_file_name(), Foctave_core_file_options(), FPAGER(), FPAGER_FLAGS(), Fsave_default_options(), and Ftexi_macros_file().
OCTINTERP_API void bind_ans | ( | const octave_value & | val, |
bool | |||
) |
Definition at line 1884 of file variables.cc.
References bind_ans(), symbol_table::force_assign(), octave_value::is_cs_list(), octave_value::is_defined(), octave_value_list::length(), octave_value::list_value(), octave_stdout, and octave_value::print_with_name().
Referenced by bind_ans(), and tree_evaluator::visit_statement().
OCTINTERP_API void bind_internal_variable | ( | const std::string & | fname, |
const octave_value & | val | ||
) |
Definition at line 1908 of file variables.cc.
References feval().
OCTINTERP_API octave_value builtin_any_variable | ( | const std::string & | ) |
OCTINTERP_API int builtin_real_scalar_variable | ( | const std::string & | , |
double & | |||
) |
OCTINTERP_API std::string builtin_string_variable | ( | const std::string & | ) |
OCTINTERP_API void clear_function | ( | const std::string & | nm | ) |
Definition at line 77 of file variables.cc.
References symbol_table::clear_function().
Referenced by symbol_table::clear_symbol(), DEFUN_DLD(), Fdaspk(), Fdasrt(), Fdassl(), Flsode(), and Fquad().
OCTINTERP_API void clear_mex_functions | ( | void | ) |
Definition at line 71 of file variables.cc.
References symbol_table::clear_mex_functions().
Referenced by do_octave_atexit().
OCTINTERP_API void clear_symbol | ( | const std::string & | nm | ) |
Definition at line 89 of file variables.cc.
References symbol_table::clear_symbol().
OCTINTERP_API void clear_variable | ( | const std::string & | nm | ) |
Definition at line 83 of file variables.cc.
References symbol_table::clear_variable().
Referenced by symbol_table::clear(), and symbol_table::clear_symbol().
OCTINTERP_API octave_function* extract_function | ( | const octave_value & | arg, |
const std::string & | warn_for, | ||
const std::string & | fname, | ||
const std::string & | header, | ||
const std::string & | trailer | ||
) |
Definition at line 143 of file variables.cc.
References error(), error_state, eval_string(), is_valid_function(), octave_value::string_value(), and warning().
Referenced by DEFUN_DLD(), Farrayfun(), Fcellfun(), Fdaspk(), Fdasrt(), Fdassl(), Flsode(), Fquad(), and Fquadcc().
OCTINTERP_API string_vector generate_struct_completions | ( | const std::string & | text, |
std::string & | prefix, | ||
std::string & | hint | ||
) |
Definition at line 244 of file variables.cc.
References discard_error_messages, discard_warning_messages, error_state, eval_string(), octave_value::is_defined(), octave_value::is_java(), octave_value::is_map(), is_variable(), octave_value::map_keys(), names(), action_container::protect_var(), action_container::run(), and warning_state.
Referenced by generate_possible_completions().
OCTINTERP_API octave_value get_global_value | ( | const std::string & | nm, |
bool | silent = false |
||
) |
Definition at line 609 of file variables.cc.
References error(), symbol_table::global_varval(), and octave_value::is_undefined().
Referenced by mexGetVariable().
OCTINTERP_API string_vector get_struct_elts | ( | const std::string & | text | ) |
Definition at line 192 of file variables.cc.
References Array< T >::length().
OCTINTERP_API octave_value get_top_level_value | ( | const std::string & | nm, |
bool | silent = false |
||
) |
Definition at line 626 of file variables.cc.
References error(), octave_value::is_undefined(), and symbol_table::top_level_varval().
OCTINTERP_API octave_function* is_valid_function | ( | const octave_value & | , |
const std::string & | = std::string() , |
||
bool | warn = false |
||
) |
Definition at line 120 of file variables.cc.
References error(), error_state, octave_value::is_string(), is_valid_function(), and octave_value::string_value().
OCTINTERP_API octave_function* is_valid_function | ( | const std::string & | , |
const std::string & | = std::string() , |
||
bool | warn = false |
||
) |
Definition at line 99 of file variables.cc.
References error(), symbol_table::find_function(), octave_value::function_value(), and octave_value::is_defined().
Referenced by extract_function(), Fdasrt(), named_hook_function::is_valid(), and is_valid_function().
OCTINTERP_API bool looks_like_struct | ( | const std::string & | text | ) |
Definition at line 297 of file variables.cc.
References file_ops::dir_sep_chars(), discard_error_messages, error_state, eval_string(), octave_value::is_defined(), octave_value::is_map(), action_container::protect_var(), and action_container::run().
Referenced by generate_completion(), and generate_possible_completions().
OCTINTERP_API octave_value lookup_function_handle | ( | const std::string & | nm | ) |
Definition at line 601 of file variables.cc.
References octave_value::is_function_handle(), octave_value(), and symbol_table::varval().
OCTINTERP_API void maybe_missing_function_hook | ( | const std::string & | name | ) |
Definition at line 2577 of file variables.cc.
References buffer_error_messages, feval(), symbol_table::find_function(), octave_value::is_defined(), action_container::protect_var(), and Vmissing_function_hook.
Referenced by tree_identifier::eval_undefined_error().
OCTINTERP_API bool mislocked | ( | const std::string & | ) |
Definition at line 1943 of file variables.cc.
References symbol_table::find_function(), octave_value::function_value(), octave_value::is_defined(), and octave_function::islocked().
Referenced by Fmislocked(), install_variables_fcns(), and mexIsLocked().
OCTINTERP_API void mlock | ( | void | ) |
Definition at line 1918 of file variables.cc.
References octave_call_stack::current(), error(), and octave_function::lock().
Referenced by DEFUN_DLD(), install_variables_fcns(), and mexLock().
OCTINTERP_API void munlock | ( | const std::string & | ) |
Definition at line 1929 of file variables.cc.
References symbol_table::find_function(), octave_value::function_value(), octave_value::is_defined(), and octave_function::unlock().
Referenced by gnuplot_graphics_toolkit::close(), Fmunlock(), install_variables_fcns(), and mexUnlock().
OCTINTERP_API void set_global_value | ( | const std::string & | nm, |
const octave_value & | val | ||
) |
Definition at line 620 of file variables.cc.
References symbol_table::global_assign().
Referenced by mexPutVariable().
OCTINTERP_API octave_value set_internal_variable | ( | bool & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm | ||
) |
Definition at line 681 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
Referenced by DEFUN(), Fhistory_control(), Fhistory_file(), Fhistory_save(), and Fhistory_size().
OCTINTERP_API octave_value set_internal_variable | ( | char & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm | ||
) |
Definition at line 713 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
OCTINTERP_API octave_value set_internal_variable | ( | int & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
int | minval = std::numeric_limits< int >::min() , |
||
int | maxval = std::numeric_limits< int >::max() |
||
) |
Definition at line 760 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
OCTINTERP_API octave_value set_internal_variable | ( | double & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
double | minval = -octave_Inf , |
||
double | maxval = octave_Inf |
||
) |
Definition at line 801 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
OCTINTERP_API octave_value set_internal_variable | ( | std::string & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
bool | empty_ok = true |
||
) |
Definition at line 841 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
OCTINTERP_API octave_value set_internal_variable | ( | int & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
const char ** | choices | ||
) |
Definition at line 878 of file variables.cc.
References error(), error_state, octave_value_list::length(), print_usage(), try_local_protect(), wants_local_change(), and warning().
OCTINTERP_API void set_top_level_value | ( | const std::string & | nm, |
const octave_value & | val | ||
) |
Definition at line 637 of file variables.cc.
References symbol_table::top_level_assign().
OCTINTERP_API int symbol_exist | ( | const std::string & | name, |
const std::string & | type = "any" |
||
) |
Definition at line 389 of file variables.cc.
References f, octave_function::fcn_file_name(), file_in_path(), load_path::find_fcn(), octave_value::function_value(), octave_value::is_anonymous_function(), octave_value::is_builtin_function(), octave_value::is_constant(), octave_value::is_defined(), base_file_stat::is_dir(), octave_value::is_dld_function(), octave_value::is_function_handle(), octave_value::is_inline_function(), is_keyword(), octave_value::is_object(), octave_value::is_user_function(), lookup_autoload(), safe_symbol_lookup(), and symbol_table::varval().
Referenced by Fexist(), and unique_symbol_name().
OCTINTERP_API std::string unique_symbol_name | ( | const std::string & | basename | ) |
Definition at line 496 of file variables.cc.
References GET_IDX, and symbol_exist().
Referenced by DEFUN_DLD(), Farrayfun(), Fcellfun(), Fdaspk(), Fdasrt(), Fdassl(), Flsode(), Fquad(), and Fquadcc().