Mercurial > hg > octave-nkf
changeset 4464:184fc19a7d99
[project @ 2003-07-13 23:15:28 by jwe]
author | jwe |
---|---|
date | Sun, 13 Jul 2003 23:15:29 +0000 |
parents | 322453495d75 |
children | 8290e9c9d4f6 |
files | doc/faq/Octave-FAQ.texi doc/interpreter/basics.txi doc/interpreter/var.txi scripts/ChangeLog scripts/miscellaneous/dump_prefs.m src/ChangeLog src/octave.cc src/pt-decl.cc |
diffstat | 8 files changed, 18 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/faq/Octave-FAQ.texi +++ b/doc/faq/Octave-FAQ.texi @@ -720,11 +720,9 @@ PS2 = "" beep_on_error = true crash_dumps_octave_core = false - default_global_variable_value = [] default_save_format = "mat-binary" define_all_return_values = true fixed_point_format = true - initialize_global_variables = true page_screen_output = false print_empty_dimensions = false warn_function_name_clash = false
--- a/doc/interpreter/basics.txi +++ b/doc/interpreter/basics.txi @@ -160,11 +160,9 @@ PS2 = "" beep_on_error = true crash_dumps_octave_core = false - default_global_variable_value = [] default_save_format = "mat-binary" define_all_return_values = true fixed_point_format = true - initialize_global_variables = true page_screen_output = false print_empty_dimensions = false warn_function_name_clash = false
--- a/doc/interpreter/var.txi +++ b/doc/interpreter/var.txi @@ -138,10 +138,6 @@ but the value of @code{x} at the top level remains unchanged, because the function works with a @emph{copy} of its argument. -@DOCSTRING(initialize_global_variables) - -@DOCSTRING(default_global_variable_value) - @DOCSTRING(isglobal) @node Status of Variables
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2003-07-13 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/dump_prefs.m: Delete default_global_variable_value + and initialize_global_variables from the list. + 2003-07-11 John W. Eaton <jwe@bevo.che.wisc.edu> * image/colormap.m: Don't save and restore default_eval_print_flag.
--- a/scripts/miscellaneous/dump_prefs.m +++ b/scripts/miscellaneous/dump_prefs.m @@ -53,7 +53,6 @@ "beep_on_error"; "completion_append_char"; "crash_dumps_octave_core"; - "default_global_variable_value"; "default_return_value"; "default_save_format"; "define_all_return_values"; @@ -71,7 +70,6 @@ "history_file"; "history_size"; "ignore_function_time_stamp"; - "initialize_global_variables"; "max_recursion_depth"; "output_max_field_width"; "output_precision";
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2003-07-13 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave.cc (maximum_braindamage): Don't set + default_global_variable_value or initialize_global_variables. + + * pt-decl.cc (Vinitialize_global_variables): Delete. + (initialize_global_variables): Delete. + (symbols_of_pt_decl): Delete. + (tree_global_command::do_init): Default initial value is now + always []. + 2003-07-11 John W. Eaton <jwe@bevo.che.wisc.edu> * octave.cc (maximum_braindamage): Don't set default_eval_print_flag.
--- a/src/octave.cc +++ b/src/octave.cc @@ -346,11 +346,9 @@ bind_builtin_variable ("PS2", ""); bind_builtin_variable ("beep_on_error", true); bind_builtin_variable ("crash_dumps_octave_core", false); - bind_builtin_variable ("default_global_variable_value", Matrix ()); bind_builtin_variable ("default_save_format", "mat-binary"); bind_builtin_variable ("define_all_return_values", true); bind_builtin_variable ("fixed_point_format", true); - bind_builtin_variable ("initialize_global_variables", true); bind_builtin_variable ("page_screen_output", false); bind_builtin_variable ("print_empty_dimensions", false); bind_builtin_variable ("warn_function_name_clash", false);
--- a/src/pt-decl.cc +++ b/src/pt-decl.cc @@ -40,10 +40,6 @@ #include "utils.h" #include "variables.h" -// Control whether otherwise uninitialized global variables are -// given a default value. -static int Vinitialize_global_variables; - // Declarations (global, static, etc.). tree_decl_elt::~tree_decl_elt (void) @@ -116,9 +112,8 @@ if (expr) init_val = expr->rvalue (); - else if (Vinitialize_global_variables) - init_val - = builtin_any_variable ("default_global_variable_value"); + else + init_val = Matrix (); ult.assign (octave_value::op_asn_eq, init_val); } @@ -182,50 +177,6 @@ } } -static int -initialize_global_variables (void) -{ - Vinitialize_global_variables - = check_preference ("initialize_global_variables"); - - return 0; -} - -void -symbols_of_pt_decl (void) -{ - DEFVAR (default_global_variable_value, , 0, - "-*- texinfo -*-\n\ -@defvr {Built-in Variable} default_global_variable_value\n\ -The default for value for otherwise uninitialized global variables.\n\ -Only used if the variable initialize_global_variables is nonzero.\n\ -If @code{initialize_global_variables} is nonzero, the value of\n\ -@code{default_glbaol_variable_value} is used as the initial value of\n\ -global variables that are not explicitly initialized. for example,\n\ -\n\ -@example\n\ -@group\n\ -initialize_global_variables = 1;\n\ -default_global_variable_value = 13;\n\ -global foo;\n\ -foo\n\ - @result{} 13\n\ -@end group\n\ -@end example\n\ -\n\ -the variable @code{default_global_variable_value} is initially undefined.\n\ -@end defvr"); - - DEFVAR (initialize_global_variables, false, initialize_global_variables, - "-*- texinfo -*-\n\ -@defvr initialize_global_variables\n\ -If the value of this variable is nonzero, global variables are given\n\ -the default initial value specified by the built-in variable\n\ -@code{default_global_variable_value}.\n\ -@end defvr"); - -} - /* ;;; Local Variables: *** ;;; mode: C++ ***