Mercurial > hg > octave-nkf
changeset 2852:2284b2652028
[project @ 1997-03-28 22:04:30 by jwe]
author | jwe |
---|---|
date | Fri, 28 Mar 1997 22:04:34 +0000 |
parents | b960bd6cbfdf |
children | ff4ee9ad942a |
files | NEWS src/ChangeLog src/parse.y |
diffstat | 3 files changed, 8 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ Summary of changes for version 2.1: ---------------------------------- + * Commas in global statements are no longer special. They are now + treated as command separators. This removes a conflict in the + grammar and is consistent with the way Matlab behaves. + * It is now possible to declare static variables that retain their values across function calls. For example,
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ Fri Mar 28 15:33:11 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * parse.y (Vwarn_comma_in_declaration): Delete. + (symbols_of_parse): Delete DEFVAR for warn_comma_in_declaration. + (decl1): Don't allow commas in declarations. + * lsode.cc (struct LSODE_OPTIONS): Handle integer options. (print_lsode_option_list, set_lsode_option, show_lsode_option): Ditto. (lsode_option_table): Add element for step limit.
--- a/src/parse.y +++ b/src/parse.y @@ -75,12 +75,6 @@ // If TRUE, generate a warning for variable swich labels. static bool Vwarn_variable_switch_label; -// If TRUE, generate a warning for the comma in things like -// -// octave> global a, b = 2 -// -static bool Vwarn_comma_in_declaration; - // If TRUE, generate warning if declared function name disagrees with // the name of the file in which it is defined. static bool Vwarn_function_name_clash; @@ -249,9 +243,6 @@ // Maybe print a warning. Duh. static void maybe_warn_missing_semi (tree_statement_list *); -// Maybe print a warning. Duh. -static void maybe_warn_comma_in_decl (void); - // Set the print flag for a statement based on the separator type. static void set_stmt_print_flag (tree_statement_list *, char, bool); @@ -614,12 +605,6 @@ $1->append ($2); $$ = $1; } - | decl1 ',' decl2 - { - maybe_warn_comma_in_decl (); - $1->append ($3); - $$ = $1; - } ; decl2 : identifier @@ -2393,19 +2378,6 @@ } } -static void -maybe_warn_comma_in_decl (void) -{ - if (Vwarn_comma_in_declaration)\ - { - warning ("comma in declaration not interpreted as a command separator"); - - if (reading_fcn_file || reading_script_file) - warning ("near line %d of file `%s'", input_line_number, - curr_fcn_file_full_name.c_str ()); - } -} - static int warn_assign_as_truth_value (void) { @@ -2416,14 +2388,6 @@ } static int -warn_comma_in_declaration (void) -{ - Vwarn_comma_in_declaration = check_preference ("warn_comma_in_declaration"); - - return 0; -} - -static int warn_function_name_clash (void) { Vwarn_function_name_clash = check_preference ("warn_function_name_clash"); @@ -2454,9 +2418,6 @@ DEFVAR (warn_assign_as_truth_value, 1.0, 0, warn_assign_as_truth_value, "produce warning for assignments used as truth values"); - DEFVAR (warn_comma_in_declaration, 1.0, 0, warn_comma_in_declaration, - "produce warning for commas in declaration statements"); - DEFVAR (warn_function_name_clash, 1.0, 0, warn_function_name_clash, "produce warning if function name conflicts with file name");