GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include "cmd-edit.h"
#include "file-ops.h"
#include "quit.h"
#include "str-vec.h"
#include "call-stack.h"
#include "debug.h"
#include "defun.h"
#include "dirfns.h"
#include "error.h"
#include "errwarn.h"
#include "help.h"
#include "hook-fcn.h"
#include "input.h"
#include "interpreter.h"
#include "lex.h"
#include "load-path.h"
#include "octave.h"
#include "octave-link.h"
#include "oct-map.h"
#include "oct-hist.h"
#include "ovl.h"
#include "ov-fcn-handle.h"
#include "pager.h"
#include "parse.h"
#include "pt.h"
#include "pt-const.h"
#include "pt-eval.h"
#include "pt-stmt.h"
#include "sighandlers.h"
#include "symtab.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Go to the source code of this file.
Classes | |
struct | ode |
Variables | |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return | arguments |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal | constant |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode | directly |
This will ensure that all pending output is written to the screen before your prompt | eealso |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an | expression |
static hook_function_list | input_event_hook_functions |
static std::string | last_debugging_command = "\n" |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable | name |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a | number |
bool | octave_completion_matches_called = false |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode | pager |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their | size |
static char | Vcompletion_append_char = ' ' |
bool | Vdebugging = false |
bool | Vdrawnow_requested = false |
int | Vecho_executing_commands = ECHO_OFF |
char | Vfilemarker = '>' |
static bool | Vgud_mode = false |
octave::sys::time | Vlast_prompt_time = 0.0 |
static std::string | VPS1 |
static std::string | VPS2 |
std::string | VPS4 = "+ " |
bool | Vtrack_line_num = true |
|
static |
Definition at line 579 of file input.cc.
References octave_link::execute_in_debugger_event().
Referenced by get_debug_input().
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode fflush | ( | stdout | ) |
std::string find_indexed_expression | ( | const std::string & | text | ) |
Definition at line 509 of file input.cc.
References octave::command_editor::get_line_buffer(), and string.
Referenced by generate_struct_completions().
OCTAVE_EXPORT octave_value_list Finput | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Referenced by install_input_fcns().
|
static |
Definition at line 397 of file input.cc.
References string_vector::append(), octave::command_editor::generate_filename_completions(), generate_possible_completions(), octave::command_editor::get_prev_char(), is_completing_dirfns(), looks_like_struct(), name, Array< T >::numel(), retval, octave::command_editor::set_completion_append_character(), string, text, and Vcompletion_append_char.
Referenced by initialize_command_input().
|
static |
Definition at line 350 of file input.cc.
References generate_struct_completions(), octave::command_editor::get_prev_char(), looks_like_struct(), make_name_list(), and string_vector::sort().
Referenced by generate_completion().
|
static |
Definition at line 585 of file input.cc.
References tree_statement_list::accept(), action_container::add_fcn(), action_container::add_method(), octave_call_stack::caller_user_code(), octave_call_stack::caller_user_code_line(), octave::current_evaluator, octave_call_stack::current_line(), e, octave_link::enter_debugger_event(), octave::command_editor::erase_empty_line(), execute_in_debugger_handler(), octave_function::fcn_file_name(), frame, get_file_line(), octave::command_editor::interrupt(), octave_function::name(), nm, action_container::protect_var(), octave::tree_evaluator::quiet_breakpoint_flag, recover_from_exception(), octave::base_parser::reset(), reset_error_handler(), retval, octave::parser::run(), octave_link::set_workspace(), octave::base_parser::stmt_list, string, and VPS1.
FILE* get_input_from_stdin | ( | void | ) |
Definition at line 341 of file input.cc.
References octave::command_editor::get_input_stream(), and octave::command_editor::set_input_stream().
|
static |
Definition at line 778 of file input.cc.
References octave_value_list::empty(), error(), eval_string(), flush_octave_stdout(), interactive_input(), octave_value_list::length(), octave_diary, octave_value(), octave_pager_stream::reset(), octave_diary_stream::reset(), retval, and string.
|
static |
Definition at line 180 of file input.cc.
References octave::command_editor::readline(), retval, and string.
Referenced by interactive_input(), and octave::command_editor::make_command_editor().
void initialize_command_input | ( | void | ) |
Definition at line 552 of file input.cc.
References generate_completion(), quoting_filename(), s, octave::command_editor::set_basic_quote_characters(), octave::command_editor::set_basic_word_break_characters(), octave::command_editor::set_completer_quote_characters(), octave::command_editor::set_completer_word_break_characters(), octave::command_editor::set_completion_function(), octave::command_editor::set_filename_quote_characters(), octave::command_editor::set_name(), and octave::command_editor::set_quoting_function().
|
inlinestatic |
Definition at line 195 of file input.cc.
References e, eval_error(), feval(), flush_octave_stdout(), gnu_readline(), recover_from_exception(), octave::sys::time::stamp(), and string.
Referenced by get_user_input(), and octave_base_reader::octave_gets().
|
static |
Definition at line 373 of file input.cc.
References octave::command_editor::get_line_buffer(), retval, and string.
Referenced by generate_completion().
|
static |
Definition at line 496 of file input.cc.
Referenced by initialize_command_input().
void remove_input_event_hook_functions | ( | void | ) |
Definition at line 130 of file input.cc.
References hook_function_list::clear().
void set_default_prompts | ( | void | ) |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return arguments |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode directly |
|
static |
|
static |
Definition at line 118 of file input.cc.
Referenced by octave_base_reader::octave_gets().
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable name |
Definition at line 871 of file input.cc.
Referenced by jit_typeinfo::add_builtin(), symbol_table::add_dispatch(), jit_typeinfo::add_print(), binmap(), class_fromName(), symbol_table::symbol_record::symbol_record_rep::clear(), jit_typeinfo::create_identity(), octave::sys::dir_entry::dir_entry(), dir_search(), jit_convert::do_assign(), octave_call_stack::do_backtrace(), symbol_table::do_cache_name(), octave_stream_list::do_clear(), do_edit_history(), symbol_table::do_insert(), do_load(), octave::sys::env::do_polite_directory_format(), gtk_manager::do_register_toolkit(), do_run_history(), do_save(), gtk_manager::do_unload_all_toolkits(), octave::opengl_selector::draw(), symbol_table::symbol_record::symbol_record_rep::dump(), dump_octave_core(), symbol_table::symbol_record::symbol_record_rep::dup(), symbol_table::symbol_record::symbol_record_rep::erase_persistent(), named_hook_function::eval(), jit_info::execute(), F__get_cmdline_fcn_txt__(), F__octave_link_list_dialog__(), symbol_table::fcn_info::fcn_info_rep::fcn_info_rep(), octave_base_stream::file_number(), QtHandles::Figure::fileName(), symbol_table::symbol_record::find(), symbol_table::fcn_info::fcn_info_rep::find_autoload(), find_first_of(), symbol_table::find_submethod(), symbol_table::fcn_info::fcn_info_rep::find_user_function(), KeyboardTranslatorManager::findTranslator(), KeyboardTranslatorManager::findTranslators(), octave::curl_transfer::form_query_string(), symbol_table::fcn_info::fcn_info_rep::full_name(), G__eigs__(), Gaudiodevinfo(), generate_completion(), graphics_object::get(), root_figure::get(), octave::ft_text_renderer::ft_font::get_face(), text_element_fontname::get_fontname(), octave::text_renderer::font::get_name(), figure::properties::get_property(), get_user_code(), file_editor::handle_edit_mfile_request(), tree_identifier::has_magic_end(), hdf5_read_next_data_internal(), hook_function::hook_function(), named_hook_function::id(), symbol_table::symbol_record::symbol_record_rep::init_persistent(), base_properties::insert_property(), symbol_table::install_built_in_function(), symbol_table::install_cmdline_function(), symbol_table::install_subfunction(), symbol_table::install_user_function(), named_hook_function::is_valid(), jit_convert::jit_convert(), kpse_readable_file(), kpse_tilde_expand(), kpse_truncate_filename(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), symbol_table::fcn_info::fcn_info_rep::load_class_constructor(), symbol_table::fcn_info::fcn_info_rep::load_class_method(), symbol_table::fcn_info::fcn_info_rep::load_private_function(), main_window::m_add_menu(), file_editor::m_add_menu(), make_filter_list(), make_stack_frame_list(), symbol_table::symbol_record::symbol_record_rep::mark_global(), symbol_table::symbol_record::symbol_record_rep::mark_persistent(), mk_tmp_hist_file(), octave_dynamic_loader::name_mangler(), octave_dynamic_loader::name_uscore_mangler(), main_window::notice_settings(), octave_errno::octave_errno(), octave_push_parse(), octave::sys::dir_entry::operator=(), path_find_first_of(), jit_extract_argument::print(), symbol_table::fcn_info::fcn_info_rep::print_dispatch(), octave_classdef::print_with_name(), files_dock_widget::process_new_dir(), files_dock_widget::process_new_file(), octave_function::profiler_name(), raw_help_from_docstrings_file(), read_binary_data(), read_mat5_binary_element(), read_mat_binary_data(), read_text_data(), jit_typeinfo::register_generic(), jit_typeinfo::register_intrinsic(), octave::dynamic_library::remove(), save_binary_data(), octave_dock_widget::save_settings(), search(), octave::opengl_selector::select(), annotation_dialog::set_gui_props(), main_window::set_window_layout(), split_name_with_package(), tree_identifier::static_workspace_error(), symbol_table::fcn_info::fcn_info_rep::subfunction_defined_in_scope(), try_cellfun_internal_ops(), tree_parameter_list::validate(), symbol_table::symbol_record::symbol_record_rep::varref(), symbol_table::symbol_record::symbol_record_rep::varval(), jit_convert::visit_statement(), and symbol_table::fcn_info::fcn_info_rep::xfind().
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a number |
Definition at line 871 of file input.cc.
Referenced by file_editor_tab::auto_margin_width(), file_editor::call_custom_editor(), jit_block::compute_idom(), KeyboardTranslator::Entry::escapedText(), read_mat5_binary_element(), QConsolePrivate::updateConsoleSize(), and write_header().
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode pager |
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number ! nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their size |
Definition at line 871 of file input.cc.
Referenced by Screen::BackSpace(), caseless_str::compare(), default_history_size(), action_container::discard(), dlsode(), octave::ft_manager::do_get_font(), octave::textscan::do_scan(), action_container::empty(), octave::ft_text_renderer::ft_font::get_face(), text_element_fontsize::get_fontsize(), octave::text_renderer::font::get_size(), get_size(), ScreenWindow::getImage(), Screen::insertChars(), octave::base_list< tree_index_expression * >::length(), lin_interpn(), octave_chunk_buffer::octave_chunk_buffer(), octave_local_buffer< T >::octave_local_buffer(), octave::delimited_stream::read(), QUnixTerminalImpl::resizeEvent(), action_container::run(), save_mat5_array_length(), HistoryTypeFile::scroll(), HistoryTypeBuffer::scroll(), TerminalView::setSize(), Screen::ShowCharacter(), slsode(), write_mat5_array(), and write_mat5_integer_data().
|
static |
Definition at line 99 of file input.cc.
Referenced by generate_completion().
Definition at line 109 of file input.cc.
Referenced by bp_table::do_add_breakpoint(), bp_table::do_remove_all_breakpoints(), bp_table::do_remove_all_breakpoints_in_file(), bp_table::do_remove_breakpoint(), parse_dbfunction_params(), octave::tree_evaluator::reset_debug_state(), octave::user_abort(), and octave::tree_evaluator::visit_return_command().
Definition at line 106 of file input.cc.
Referenced by delete_graphics_object(), gh_manager::do_execute_callback(), gh_manager::do_process_events(), F__zoom__(), Fdrawnow(), and G__fltk_check__().
Definition at line 93 of file input.cc.
Referenced by do_edit_history(), octave_user_function::do_multi_index_op(), do_run_history(), and octave::tree_evaluator::visit_statement().
char Vfilemarker = '>' |
Definition at line 124 of file input.cc.
Referenced by bp_table::do_add_breakpoint_1(), bp_table::do_get_breakpoint_list(), octave_call_stack::stack_frame::fcn_name(), symbol_table::find_function(), and symbol_table::find_submethod().
octave::sys::time Vlast_prompt_time = 0.0 |
Definition at line 96 of file input.cc.
Referenced by out_of_date_check(), and rehash_internal().
|
static |
Definition at line 78 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), get_debug_input(), octave_base_reader::octave_gets(), and set_default_prompts().
|
static |
Definition at line 81 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), octave_base_reader::octave_gets(), and set_default_prompts().
std::string VPS4 = "+ " |
Definition at line 84 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), tree_statement::echo_code(), octave_user_function::print_code_function_header(), octave_user_function::print_code_function_trailer(), and set_default_prompts().
bool Vtrack_line_num = true |
Definition at line 114 of file input.cc.
Referenced by octave_user_script::do_multi_index_op(), octave_user_function::do_multi_index_op(), and octave::tree_evaluator::visit_statement().