GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "octave-config.h"
#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 126 of file variables.h.
Referenced by Fjit_failcnt(), Foptimize_subsasgn_calls(), Fprint_empty_dimensions(), Fsilent_functions(), Fsparse_auto_mutate(), and Fstring_fill_char().
#define SET_INTERNAL_VARIABLE_CHOICES | ( | NM, | |
CHOICES | |||
) | set_internal_variable (V ## NM, args, nargout, #NM, CHOICES) |
Definition at line 136 of file variables.h.
#define SET_INTERNAL_VARIABLE_WITH_LIMITS | ( | NM, | |
MINVAL, | |||
MAXVAL | |||
) | set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL) |
Definition at line 132 of file variables.h.
Referenced by Fsave_precision(), and Fstruct_levels_to_print().
#define SET_NONEMPTY_INTERNAL_STRING_VARIABLE | ( | NM | ) | set_internal_variable (V ## NM, args, nargout, #NM, false) |
Definition at line 129 of file variables.h.
Referenced by FEDITOR().
OCTINTERP_API void bind_ans | ( | const octave_value & | val, |
bool | |||
) |
Referenced by octave::tree_evaluator::visit_statement().
OCTINTERP_API void bind_internal_variable | ( | const std::string & | fname, |
const octave_value & | val | ||
) |
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 79 of file variables.cc.
References symbol_table::clear_function().
Referenced by symbol_table::clear_symbol(), DEFUN(), and G__eigs__().
OCTINTERP_API void clear_mex_functions | ( | void | ) |
Definition at line 73 of file variables.cc.
References symbol_table::clear_mex_functions().
OCTINTERP_API void clear_symbol | ( | const std::string & | nm | ) |
Definition at line 91 of file variables.cc.
References symbol_table::clear_symbol().
OCTINTERP_API void clear_variable | ( | const std::string & | nm | ) |
Definition at line 85 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 145 of file variables.cc.
References error(), eval_string(), is_valid_function(), retval, s, string, warning(), and octave_value::xstring_value().
Referenced by DEFUN(), and G__eigs__().
OCTINTERP_API string_vector generate_struct_completions | ( | const std::string & | text, |
std::string & | prefix, | ||
std::string & | hint | ||
) |
Definition at line 236 of file variables.cc.
References array(), discard_error_messages, discard_warning_messages, eval_string(), find_indexed_expression(), frame, octave_value::is_classdef_object(), octave_value::is_defined(), octave_value::is_java(), octave_value::is_map(), is_variable(), octave_value::map_keys(), action_container::protect_var(), recover_from_exception(), action_container::run(), string, and tmp.
Referenced by generate_possible_completions().
OCTINTERP_API octave_value get_global_value | ( | const std::string & | nm, |
bool | silent = false |
||
) |
Referenced by mexGetVariable().
OCTINTERP_API string_vector get_struct_elts | ( | const std::string & | text | ) |
Definition at line 184 of file variables.cc.
References Array< T >::length(), and retval.
OCTINTERP_API octave_value get_top_level_value | ( | const std::string & | nm, |
bool | silent = false |
||
) |
OCTINTERP_API octave_function* is_valid_function | ( | const octave_value & | , |
const std::string & | = "" , |
||
bool | warn = false |
||
) |
Definition at line 123 of file variables.cc.
References error(), octave_value::is_string(), is_valid_function(), string, and octave_value::string_value().
OCTINTERP_API octave_function* is_valid_function | ( | const std::string & | , |
const std::string & | = "" , |
||
bool | warn = false |
||
) |
Definition at line 101 of file variables.cc.
References error(), symbol_table::find_function(), octave_value::function_value(), octave_value::is_defined(), and val.
Referenced by DEFUN(), extract_function(), named_hook_function::is_valid(), and is_valid_function().
OCTINTERP_API bool looks_like_struct | ( | const std::string & | text, |
char | prev_char | ||
) |
Definition at line 305 of file variables.cc.
References octave::sys::file_ops::dir_sep_chars(), discard_error_messages, eval_string(), frame, octave_value::is_defined(), octave_value::is_map(), action_container::protect_var(), retval, action_container::run(), and tmp.
Referenced by generate_completion(), and generate_possible_completions().
OCTINTERP_API octave_value lookup_function_handle | ( | const std::string & | nm | ) |
OCTINTERP_API void maybe_missing_function_hook | ( | const std::string & | name | ) |
Definition at line 2268 of file variables.cc.
Referenced by tree_identifier::eval_undefined_error().
OCTINTERP_API bool mislocked | ( | const std::string & | ) |
Referenced by mexIsLocked().
OCTINTERP_API void mlock | ( | void | ) |
Referenced by G__init_fltk__(), G__init_gnuplot__(), and mexLock().
OCTINTERP_API void munlock | ( | const std::string & | ) |
Referenced by gnuplot_graphics_toolkit::close(), and mexUnlock().
OCTINTERP_API void set_global_value | ( | const std::string & | nm, |
const octave_value & | val | ||
) |
Referenced by mexPutVariable().
OCTINTERP_API octave_value set_internal_variable | ( | bool & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm | ||
) |
Referenced by octave::lexical_feedback::init().
OCTINTERP_API octave_value set_internal_variable | ( | char & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm | ||
) |
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() |
||
) |
OCTINTERP_API octave_value set_internal_variable | ( | double & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
double | minval = -octave::numeric_limits< double >::Inf() , |
||
double | maxval = octave::numeric_limits< double >::Inf() |
||
) |
OCTINTERP_API octave_value set_internal_variable | ( | std::string & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
bool | empty_ok = true |
||
) |
OCTINTERP_API octave_value set_internal_variable | ( | std::string & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
const char ** | choices | ||
) |
OCTINTERP_API octave_value set_internal_variable | ( | int & | var, |
const octave_value_list & | args, | ||
int | nargout, | ||
const char * | nm, | ||
const char ** | choices | ||
) |
OCTINTERP_API void set_top_level_value | ( | const std::string & | nm, |
const octave_value & | val | ||
) |
OCTINTERP_API int symbol_exist | ( | const std::string & | name, |
const std::string & | type = "any" |
||
) |
Definition at line 382 of file variables.cc.
References error(), file_in_path(), symbol_table::find_cmdline_function(), load_path::find_fcn(), fs, octave_value::is_anonymous_function(), symbol_table::is_built_in_function_name(), octave_value::is_constant(), octave_value::is_defined(), octave::sys::base_file_stat::is_dir(), octave_value::is_function_handle(), octave_value::is_inline_function(), octave::is_keyword(), octave_value::is_object(), lookup_autoload(), string, val, and symbol_table::varval().
Referenced by unique_symbol_name().
OCTINTERP_API std::string unique_symbol_name | ( | const std::string & | basename | ) |
Definition at line 491 of file variables.cc.
References GET_IDX, octave_value_list::length(), nm, string, and symbol_exist().
Referenced by DEFUN(), and G__eigs__().